Do not fail trying to restore state for non-existing layers

This commit is contained in:
D. Berge
2023-09-13 11:22:05 +02:00
parent ee129b2faa
commit 2cc293b724

View File

@@ -852,7 +852,7 @@ export default {
}
if (init.activeLayers) {
init.activeLayers.forEach(l => layers[l].addTo(map));
init.activeLayers.forEach(l => layers[l]?.addTo(map));
} else {
layers.OpenSeaMap.addTo(map);
layers.Preplots.addTo(map);