Fix JavaScript errors when receiver position is not set

This commit is contained in:
Carlos Salaverria 2016-09-12 16:06:25 -05:00
parent 1ce66eb884
commit e784b529a8

View file

@ -427,7 +427,7 @@ function initialize_map() {
sortByDistance(); sortByDistance();
} else { } else {
SitePosition = null; 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 document.getElementById("distance").style.display = 'none'; // hide distance header
sortByAltitude(); sortByAltitude();
} }
@ -1282,7 +1282,7 @@ function onDisplayUnitsChanged(e) {
refreshSelected(); refreshSelected();
// Redraw range rings // Redraw range rings
if (SiteCircleFeatures) { if (SitePosition !== null && SitePosition !== undefined && SiteCircles) {
createSiteCircleFeatures(); createSiteCircleFeatures();
} }