diff --git a/src/ol/format/filter/Bbox.js b/src/ol/format/filter/Bbox.js index 04455a28df..736abadcfc 100644 --- a/src/ol/format/filter/Bbox.js +++ b/src/ol/format/filter/Bbox.js @@ -31,6 +31,9 @@ class Bbox extends Filter { * @type {import("../../extent.js").Extent} */ this.extent = extent; + if (extent.length !== 4) { + throw new Error('Expected an extent with four values ([minX, minY, maxX, maxY])'); + } /** * @type {string|undefined}