Simplifying condition for null geojson geometries.
Used feedback from @mourner to make the change from the pull request #1240
This commit is contained in:
parent
2a38a809d3
commit
971e55b911
@ -21,11 +21,8 @@ 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 ((typeof features[i].geometries !== undefined && features[i].geometries !== null) &&
|
||||
(typeof features[i].geometry !== undefined && features[i].geometry !== null)) {
|
||||
|
||||
if (features[i].geometries || features[i].geometry) {
|
||||
this.addData(features[i]);
|
||||
|
||||
}
|
||||
}
|
||||
return this;
|
||||
|
Loading…
Reference in New Issue
Block a user