import { select } from 'd3-selection'

export function ensureData(d, i) {
  if (!d) select(this).datum([])
}

@@ -73,15 +73,47 @@
 %7B%0A  
-if (!d)
+let rows = d %7C%7C %5B%5D%0A  rows.rows = null%0A 
  sel
@@ -128,14 +128,16 @@
 ).datum(
-%5B%5D
+rows
 )%0A%7D%0A

Fix stale data: Encapsulate initial pre-processed row cleanup.