diff --git a/web_assets/functions.js b/web_assets/functions.js index 9fd7d0b..847fba9 100644 --- a/web_assets/functions.js +++ b/web_assets/functions.js @@ -211,6 +211,7 @@ function drawMapControls() { // parse the data as definned in the regions.js function initRegions() { if (regionsInit) { return; } + if (typeof(regionData) == "undefined") { return; } // skip this if we have no region.js file regionsInit = true; for (i in regionGroups) { @@ -295,6 +296,7 @@ function initRegions() { // may need to be reviewed by agrif or someone else... little finicky right now. function initMarkers() { if (markersInit) { return; } // oh, we've already done this? nevermind, exit the function. + if (typeof(markerData) == "undefined") { return; } // no markers.js file, so skip this. markersInit = true; // now that we've started, dont have to do it twice. // first, give all collections an empty array to work with