Interactive interface for browsing global, full-resolution satellite imagery
Fix adding layers when no layers present #1084
Benjamin Kinge6ad9cb56065
diff --git a/web/js/map/ui.js b/web/js/map/ui.jsindex fb4818bf3..5e99719b9 100644--- a/web/js/map/ui.js+++ b/web/js/map/ui.js@@ -413,7 +413,7 @@ export function mapui(models, config) {addGraticule(def.opacity, models.layers.activeLayers);} else {def.availableDates = util.datesinDateRanges(def, date, true);- if (firstLayer.get('group')) {+ if (firstLayer && firstLayer.get('group')) {// Find which map layer-group is the active LayerGroup// and add layer to layerGroup in correct locationlet activelayer =