From 4d5c3675079250822eaf7f82362a99bd9dc76c48 Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Fri, 20 Mar 2015 23:11:04 +0100 Subject: [PATCH] history: link only to markers that exist --- history.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/history.js b/history.js index 552191e..a4dbf11 100644 --- a/history.js +++ b/history.js @@ -311,8 +311,10 @@ function addToList(el, showContact, tf, markers, list) { a.classList.add("hostname") a.classList.add(d.flags.online ? "online" : "offline") a.textContent = d.nodeinfo.hostname - a.href = "#" - a.onclick = markers[d.nodeinfo.node_id] + if (d.nodeinfo.node_id in markers) { + a.href = "#" + a.onclick = markers[d.nodeinfo.node_id] + } td1.appendChild(a) if ("location" in d.nodeinfo) {