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 {