fix error when adding custom overlay

This commit is contained in:
vcoppe
2024-09-03 14:43:20 +02:00
parent 056e7a3980
commit 979cdd1bac

View File

@@ -184,7 +184,11 @@
return $tree;
});
if ($map) {
if (
$currentOverlays.overlays['custom'] &&
$currentOverlays.overlays['custom'][layerId] &&
$map
) {
try {
$map.removeImport(layerId);
} catch (e) {