remove custom layer import only if present

This commit is contained in:
vcoppe
2024-09-04 13:15:36 +02:00
parent a3dc17d780
commit 96836228db

View File

@@ -256,7 +256,11 @@
}
$customOverlayOrder = $customOverlayOrder.filter((id) => id !== layerId);
if ($map) {
if (
$currentOverlays.overlays['custom'] &&
$currentOverlays.overlays['custom'][layerId] &&
$map
) {
try {
$map.removeImport(layerId);
} catch (e) {