diff --git a/src/ol/format/geojsonformat.js b/src/ol/format/geojsonformat.js index c5b03db581..1d3d7da2bf 100644 --- a/src/ol/format/geojsonformat.js +++ b/src/ol/format/geojsonformat.js @@ -57,6 +57,9 @@ ol.format.GeoJSON.EXTENSIONS_ = ['.geojson']; * @return {ol.geom.Geometry} Geometry. */ ol.format.GeoJSON.readGeometry_ = function(object) { + if (goog.isNull(object)) { + return null; + } var geometryReader = ol.format.GeoJSON.GEOMETRY_READERS_[object.type]; goog.asserts.assert(goog.isDef(geometryReader)); return geometryReader(object);