mbostock/topojson — pull request #3 by sztanko (2012-11-23 18:01:58+00:00)
Title: Check empty "line" array

Hi Mike,
It turned out the script fails in the case of empty "line" arrays. I made a small check for that, now my geojson file compiles.

topojson/lib/topojson/topology.js:114
x = (point[0] - x0) * kx | 0,
^
TypeError: Cannot read property '0' of undefined

Empty lines usually don't happen. My test geojson was coming from shapefile which was simplified using MapShaper, so probably this might happen more then once.