From b9b61cae0040c8bb02396e18273d54f844c111a9 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Fri, 12 Nov 2021 23:00:40 -0700 Subject: [PATCH] Fix a bug --- js/map.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/map.js b/js/map.js index 6349f1f..df9c5f6 100644 --- a/js/map.js +++ b/js/map.js @@ -100,7 +100,10 @@ function showLocationPopup(latitude, longitude, words, accuracy) { latitude + (accuracy / 2), longitude + (accuracy / 2) ); - window.location.hash = latitude + "," + longitude; + // This prevents a bug where the app starts looping because it reacts to its own hash changes + if (accuracy == 0.0001) { + window.location.hash = latitude + "," + longitude; + } } function drawRectangle(fromlat, fromlng, tolat, tolng) {