From d68a88da2615039be52666fddcb3259b7f88b054 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Fri, 20 Dec 2013 17:53:46 +0100 Subject: [PATCH] Always return an array of features, even if no features are read --- src/ol/format/geojsonformat.js | 2 +- src/ol/format/xmlformat.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ol/format/geojsonformat.js b/src/ol/format/geojsonformat.js index 9c4acc76f9..8d975f6a4c 100644 --- a/src/ol/format/geojsonformat.js +++ b/src/ol/format/geojsonformat.js @@ -331,7 +331,7 @@ ol.format.GeoJSON.prototype.readFeaturesFromObject = function(object) { return features; } else { goog.asserts.fail(); - return null; + return []; } }; diff --git a/src/ol/format/xmlformat.js b/src/ol/format/xmlformat.js index e957102d82..0025cbd452 100644 --- a/src/ol/format/xmlformat.js +++ b/src/ol/format/xmlformat.js @@ -79,7 +79,7 @@ ol.format.XML.prototype.readFeatures = function(source) { return this.readFeaturesFromDocument(doc); } else { goog.asserts.fail(); - return null; + return []; } };