Always return an array of features, even if no features are read

This commit is contained in:
Tom Payne
2013-12-20 17:53:46 +01:00
parent 1a78c17713
commit d68a88da26
2 changed files with 2 additions and 2 deletions

View File

@@ -331,7 +331,7 @@ ol.format.GeoJSON.prototype.readFeaturesFromObject = function(object) {
return features;
} else {
goog.asserts.fail();
return null;
return [];
}
};

View File

@@ -79,7 +79,7 @@ ol.format.XML.prototype.readFeatures = function(source) {
return this.readFeaturesFromDocument(doc);
} else {
goog.asserts.fail();
return null;
return [];
}
};