diff options
Diffstat (limited to 'web/index.js')
| -rw-r--r-- | web/index.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/web/index.js b/web/index.js index 999e333..5e7323b 100644 --- a/web/index.js +++ b/web/index.js | |||
| @@ -143,8 +143,11 @@ async function load(gpxFile) { | |||
| 143 | el("code", {}, txt(sit.id)), | 143 | el("code", {}, txt(sit.id)), |
| 144 | txt(": " + firstComment)); | 144 | txt(": " + firstComment)); |
| 145 | 145 | ||
| 146 | const markerLayer = L.marker(sit.location); | 146 | // TODO: decide what to do if the situation has no location |
| 147 | markerLayer.addTo(layerGroup).bindPopup(commentEl); | 147 | if (sit.location) { |
| 148 | const markerLayer = L.marker(sit.location); | ||
| 149 | markerLayer.addTo(layerGroup).bindPopup(commentEl); | ||
| 150 | } | ||
| 148 | 151 | ||
| 149 | sit.relevant_road_closures.forEach((rc) => { | 152 | sit.relevant_road_closures.forEach((rc) => { |
| 150 | rc.relevant_lss.forEach((ls) => { | 153 | rc.relevant_lss.forEach((ls) => { |