From 1941fa89166bf571fc84ba9607edb66082e6d6d5 Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 26 Jul 2022 21:33:56 +0200 Subject: [PATCH] Fix bug if marker is missing --- index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.js b/index.js index 73fb43b..b2c7470 100644 --- a/index.js +++ b/index.js @@ -1572,7 +1572,6 @@ document.addEventListener("DOMContentLoaded", function () { map.setBearing(current_heading); } - if (myMarker.getIcon().options.html != follow_icon.options.html) myMarker.setIcon(follow_icon); @@ -1587,7 +1586,7 @@ document.addEventListener("DOMContentLoaded", function () { mym1 = true } - + if (myMarker.getIcon().options.html != follow_icon.options.html) myMarker.setIcon(follow_icon); //store device location device_lat = crd.latitude;