From 36e7ec4cd8918446faa6c6c82ef10264b34f1bfb Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Thu, 22 Sep 2016 15:28:07 +0100 Subject: [PATCH] Fix the ident link. --- public_html/script.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public_html/script.js b/public_html/script.js index 21c355d..7dc436b 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -888,7 +888,11 @@ function refreshTableInfo() { } // ICAO doesn't change - tableplane.tr.cells[2].innerHTML = getFlightAwareModeSLink(tableplane.icao, tableplane.flight); + if (tableplane.flight) { + tableplane.tr.cells[2].innerHTML = getFlightAwareModeSLink(tableplane.icao, tableplane.flight, tableplane.flight); + } else { + tableplane.tr.cells[2].innerHTML = ""; + } tableplane.tr.cells[3].textContent = (tableplane.registration !== null ? tableplane.registration : ""); tableplane.tr.cells[4].textContent = (tableplane.icaotype !== null ? tableplane.icaotype : ""); tableplane.tr.cells[5].textContent = (tableplane.squawk !== null ? tableplane.squawk : "");