aboutsummaryrefslogtreecommitdiffstats
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/LocationsMap.svelte6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/components/LocationsMap.svelte b/src/components/LocationsMap.svelte
index b9833c6c..76523006 100644
--- a/src/components/LocationsMap.svelte
+++ b/src/components/LocationsMap.svelte
@@ -201,8 +201,10 @@
});
onDestroy(async () => {
- map.off('zoomend', updateLabelVisibility);
- map && map.remove();
+ if (map) {
+ map.off('zoomend', updateLabelVisibility);
+ map.remove();
+ }
});
</script>