Browse files

Fix bug with null id.

  • Loading branch information...
1 parent 666be93 commit 2432650d89f8e3e971af0b5364eb5c33a4c25d55 @mbostock committed Dec 31, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 bin/topojson
View
2 bin/topojson
@@ -53,7 +53,7 @@ if (!argv._.length || argv.help) return optimist.showHelp();
var objects = {},
object,
id = argv["id-property"],
- idType = /^\+/.test(id) ? (id = id.substring(1), Number) : function(d) { return d; };
+ idType = /^\+/.test(id) ? (id = id.substring(1), function(d) { d = +d; return isNaN(d) ? undefined : d; }) : function(d) { return d; };
// Create a map from basename to JSON object.
// Convert TopoJSON back to GeoJSON in preparation for merge, as needed.

0 comments on commit 2432650

Please sign in to comment.