diff --git a/src/layer/GeoJSON.js b/src/layer/GeoJSON.js index 99fef988..6b403a02 100644 --- a/src/layer/GeoJSON.js +++ b/src/layer/GeoJSON.js @@ -20,7 +20,10 @@ L.GeoJSON = L.FeatureGroup.extend({ if (features) { for (i = 0, len = features.length; i < len; i++) { - this.addData(features[i]); + // Only add this if geometry or geometries are set and not null + if (features[i].geometries || features[i].geometry) { + this.addData(features[i]); + } } return this; }