Added check to make sure extent array has four objects.
This commit is contained in:
@@ -30,7 +30,11 @@ class Bbox extends Filter {
|
|||||||
/**
|
/**
|
||||||
* @type {import("../../extent.js").Extent}
|
* @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}
|
* @type {string|undefined}
|
||||||
|
|||||||
Reference in New Issue
Block a user