From 387c92e3cb83f183d01864f1dd374c3c8f00d8f5 Mon Sep 17 00:00:00 2001 From: James Lyne Date: Fri, 28 May 2021 19:50:08 +0100 Subject: [PATCH] Fix hot-reloading Map component --- src/components/Map.vue | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/components/Map.vue b/src/components/Map.vue index 77c6a0c..04f8df6 100644 --- a/src/components/Map.vue +++ b/src/components/Map.vue @@ -16,15 +16,17 @@ @@ -225,6 +227,7 @@ export default defineComponent({ unmounted() { window.removeEventListener('keydown', this.handleKeydown); + this.leaflet.remove(); }, methods: {