Merge pull request #1240 from brianherbert/allow-null-geojson
Allow null GeoJSON geometries.
This commit is contained in:
commit
733666bcab
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user