From e0329febc4c9e16018288997ec15e3ffe5f83354 Mon Sep 17 00:00:00 2001 From: Jakob Gerstmayer Date: Fri, 25 Oct 2019 11:43:18 +0200 Subject: [PATCH] Added check to make sure extent array has four objects. --- src/ol/format/filter/Bbox.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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}