From e784b529a842b0d42b318133ba8e5d78ae8da878 Mon Sep 17 00:00:00 2001 From: Carlos Salaverria Date: Mon, 12 Sep 2016 16:06:25 -0500 Subject: [PATCH] Fix JavaScript errors when receiver position is not set --- public_html/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public_html/script.js b/public_html/script.js index 656eeeb..b12d2a0 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -427,7 +427,7 @@ function initialize_map() { sortByDistance(); } else { SitePosition = null; - PlaneRowTemplate.cells[6].style.display = 'none'; // hide distance column + PlaneRowTemplate.cells[9].style.display = 'none'; // hide distance column document.getElementById("distance").style.display = 'none'; // hide distance header sortByAltitude(); } @@ -1282,7 +1282,7 @@ function onDisplayUnitsChanged(e) { refreshSelected(); // Redraw range rings - if (SiteCircleFeatures) { + if (SitePosition !== null && SitePosition !== undefined && SiteCircles) { createSiteCircleFeatures(); }