diff --git a/src/ol/format/filter/Bbox.js b/src/ol/format/filter/Bbox.js index 04455a28df..abcb11e1e7 100644 --- a/src/ol/format/filter/Bbox.js +++ b/src/ol/format/filter/Bbox.js @@ -30,7 +30,11 @@ class Bbox extends Filter { /** * @type {import("../../extent.js").Extent} */ - this.extent = extent; + if(extent.length === 4) { + this.extent = extent; + } else { + throw new Error('Error: Extent should look like this: [minx, miny, maxx, maxy]'); + } /** * @type {string|undefined}