From ffaef5bb4cba1cc6ed25840309ee11a0247e7a03 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Wed, 4 Sep 2013 14:25:03 -0400 Subject: [PATCH 1/2] Check for icon existence before disabling edit state --- src/edit/handler/EditToolbar.Edit.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/edit/handler/EditToolbar.Edit.js b/src/edit/handler/EditToolbar.Edit.js index 41bca8f2d..49c38fbc4 100644 --- a/src/edit/handler/EditToolbar.Edit.js +++ b/src/edit/handler/EditToolbar.Edit.js @@ -135,6 +135,9 @@ L.EditToolbar.Edit = L.Handler.extend({ }, _toggleMarkerHighlight: function (marker) { + if (!marker._icon) { + return; + } // This is quite naughty, but I don't see another way of doing it. (short of setting a new icon) var icon = marker._icon; From 6949a5a5137225d6e89577ebbb96ec5f53b51dd7 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Wed, 4 Sep 2013 14:26:42 -0400 Subject: [PATCH 2/2] "Style" --- src/edit/handler/EditToolbar.Edit.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/edit/handler/EditToolbar.Edit.js b/src/edit/handler/EditToolbar.Edit.js index 49c38fbc4..2371791a2 100644 --- a/src/edit/handler/EditToolbar.Edit.js +++ b/src/edit/handler/EditToolbar.Edit.js @@ -135,9 +135,9 @@ L.EditToolbar.Edit = L.Handler.extend({ }, _toggleMarkerHighlight: function (marker) { - if (!marker._icon) { - return; - } + if (!marker._icon) { + return; + } // This is quite naughty, but I don't see another way of doing it. (short of setting a new icon) var icon = marker._icon;