diff options
| author | Adam Soltys <[email protected]> | 2023-09-25 22:39:32 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-09-25 22:39:32 -0700 |
| commit | a77cb9398bfbe596b1b575eb1f07ebedd6474c33 (patch) | |
| tree | bcb677e001e1d29000245a47f9b529ce1dab2022 /src/components | |
| parent | a2758b9a026ae91f178478eb15988c2bfddd83ae (diff) | |
| download | coinos-ui-a77cb9398bfbe596b1b575eb1f07ebedd6474c33.tar.gz coinos-ui-a77cb9398bfbe596b1b575eb1f07ebedd6474c33.zip | |
check for map
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/LocationsMap.svelte | 6 |
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> |
