summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustav Sörnäs <gusso230@student.liu.se>2020-12-15 09:33:56 +0100
committerGustav Sörnäs <gusso230@student.liu.se>2020-12-15 09:33:56 +0100
commit28bf2e9d0df6e093c80d62d5fc9a27bff7d87104 (patch)
tree9c68e31afe007df50ce755bf2e03f01eb27f905b
parent929d4caa2ba4771d92dfb979eda94649ba27c8a4 (diff)
downloadtdde25-28bf2e9d0df6e093c80d62d5fc9a27bff7d87104.tar.gz
Apply 1 suggestion(s) to 1 file(s)
-rw-r--r--templates/index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/index.js b/templates/index.js
index 3edbd26..0bbcdbe 100644
--- a/templates/index.js
+++ b/templates/index.js
@@ -62,7 +62,7 @@ showMarkers()
async function showUnconnectedMarkers() {
res = await fetch('/show-unconnected-nodes');
- res = await res.json();
+ const res = await fetch('/show-unconnected-nodes').then(res => res.json());
for (let key in res) {
var marker = L.marker(res[key]).addTo(map)
}