aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-09-25 22:39:32 -0700
committerAdam Soltys <[email protected]>2023-09-25 22:39:32 -0700
commit695923dff329c15d88341002c5788ef397f1c611 (patch)
treebcb677e001e1d29000245a47f9b529ce1dab2022 /src
parentd1ff07013a6c5c8f860fc787ad2baed7bcd2c9ca (diff)
downloadcoinos-ui-695923dff329c15d88341002c5788ef397f1c611.tar.gz
coinos-ui-695923dff329c15d88341002c5788ef397f1c611.zip
check for map
Diffstat (limited to 'src')
-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>