Merge pull request #1240 from brianherbert/allow-null-geojson
Allow null GeoJSON geometries.
This commit is contained in:
commit
733666bcab
@ -20,8 +20,11 @@ L.GeoJSON = L.FeatureGroup.extend({
|
||||
|
||||
if (features) {
|
||||
for (i = 0, len = features.length; i < len; 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