From 83a918477f24fd86bc2783e266ac59a4c687020f Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Thu, 12 Dec 2024 01:55:25 +0100 Subject: [PATCH] Fix: fix #2309 --- src/Logic/BBox.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Logic/BBox.ts b/src/Logic/BBox.ts index 000dd5463..5077842ee 100644 --- a/src/Logic/BBox.ts +++ b/src/Logic/BBox.ts @@ -68,17 +68,16 @@ export class BBox { * */ static get(feature: Feature): BBox { - if (feature.bbox?.["overlapsWith"] === undefined) { + const f = feature + if (f.bbox?.overlapsWith === undefined) { const [minX, minY, maxX, maxY]: number[] = turf.bbox(feature) // Note: x is longitude - // @ts-ignore - feature["bbox"] = new BBox([ + f["bbox"] = new BBox([ [minX, minY], [maxX, maxY], ]) } - // @ts-ignore - return feature["bbox"] + return f["bbox"] } static bboxAroundAll(bboxes: BBox[]): BBox {