From 9408ce10c7911f55b17a73d90ecdb5cbc683c901 Mon Sep 17 00:00:00 2001 From: vcoppe Date: Sun, 1 Feb 2026 16:26:17 +0100 Subject: [PATCH] check that map contains the layer --- website/src/lib/components/map/map-layer-event-manager.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/website/src/lib/components/map/map-layer-event-manager.ts b/website/src/lib/components/map/map-layer-event-manager.ts index 95e7e70f0..29412098c 100644 --- a/website/src/lib/components/map/map-layer-event-manager.ts +++ b/website/src/lib/components/map/map-layer-event-manager.ts @@ -263,6 +263,7 @@ export class MapLayerEventManager { lngLat: maplibregl.LngLat ): string[] { let result = layerIds.filter((layerId) => { + if (!this._map.getLayer(layerId)) return false; const fileId = layerId.replace('-waypoints', ''); if (fileId === layerId) { return fileStateCollection.getStatistics(fileId)?.inBBox(lngLat) ?? true;