From 393ae7a98f45f0cd1541ec584b35088c181a4b19 Mon Sep 17 00:00:00 2001 From: Tina Hammar Date: Fri, 16 Feb 2024 16:01:53 +0100 Subject: [PATCH] Update Snapping.js --- src/js/Mixins/Snapping.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/Mixins/Snapping.js b/src/js/Mixins/Snapping.js index fce9e51c..51c181fe 100644 --- a/src/js/Mixins/Snapping.js +++ b/src/js/Mixins/Snapping.js @@ -258,7 +258,7 @@ const SnapMixin = { this.debugIndicatorLines = debugIndicatorLines; }, _handleSnapLayerRemoval({ layer }) { - if (!layer._leaflet_id) { + if (!layer._leaflet_id || !this._snapList) { return; } // find the layers index in snaplist