Skip to content

Commit

Permalink
backport the geojson featurecollection arrays fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner committed Feb 6, 2013
1 parent 0dcbed8 commit 241cc7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/layer/GeoJSON.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ L.GeoJSON = L.FeatureGroup.extend({
},

addData: function (geojson) {
var features = L.Util.isArray(geojson) ? geojson : geojson.features,
var features = L.Util.isArray(geojson) ? geojson : geojson.features,
i, len;

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) {
if (features[i].geometries || features[i].geometry || features[i].features) {
this.addData(features[i]);
}
}
Expand Down

0 comments on commit 241cc7d

Please sign in to comment.