lib/adiwg/mdtranslator/writers/html/sections/html_bodyScript.js in adiwg-mdtranslator-2.0.0rc13 vs lib/adiwg/mdtranslator/writers/html/sections/html_bodyScript.js in adiwg-mdtranslator-2.0.0

- old
+ new

@@ -161,10 +161,15 @@ var map = L.map(geoExtent.querySelector('div.map'), {noWrap: true}); // get a pointer to the map header switch var header = geoExtent.querySelector('summary.map-summary'); // get the GeoJSON from the geojson div var geoJsonDiv = geoExtent.querySelector('div.geojson'); - var geojson = JSON.parse(geoJsonDiv.textContent || geoJsonDiv.innerText); + if (geoJsonDiv) { + var geojson = JSON.parse(geoJsonDiv.textContent || geoJsonDiv.innerText); + } + else { + var geojson = []; + } // get the user provided bounding box for the extent - if any var userBBox = geoExtent.querySelector('div.userBBox'); if (userBBox) { var userCoords = bbox2Poly(userBBox); var newUserBBox = {