Always return an array of features, even if no features are read
This commit is contained in:
@@ -331,7 +331,7 @@ ol.format.GeoJSON.prototype.readFeaturesFromObject = function(object) {
|
|||||||
return features;
|
return features;
|
||||||
} else {
|
} else {
|
||||||
goog.asserts.fail();
|
goog.asserts.fail();
|
||||||
return null;
|
return [];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ ol.format.XML.prototype.readFeatures = function(source) {
|
|||||||
return this.readFeaturesFromDocument(doc);
|
return this.readFeaturesFromDocument(doc);
|
||||||
} else {
|
} else {
|
||||||
goog.asserts.fail();
|
goog.asserts.fail();
|
||||||
return null;
|
return [];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user