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
commita77cb9398bfbe596b1b575eb1f07ebedd6474c33 (patch)
treebcb677e001e1d29000245a47f9b529ce1dab2022 /src
parenta2758b9a026ae91f178478eb15988c2bfddd83ae (diff)
downloadcoinos-ui-a77cb9398bfbe596b1b575eb1f07ebedd6474c33.tar.gz
coinos-ui-a77cb9398bfbe596b1b575eb1f07ebedd6474c33.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>