Interactive interface for browsing global, full-resolution satellite imagery
Fix break when compare inactive #1084
Benjamin Kingae6e6106e055
diff --git a/web/js/date/timeline.js b/web/js/date/timeline.jsindex feae94c87..74e5e157f 100644--- a/web/js/date/timeline.js+++ b/web/js/date/timeline.js@@ -253,10 +253,12 @@ export function timeline(models, config, ui) {self.zoom.refresh();self.setClip();});-model.events.on('select', updateTimeUi);model.events.on('state-update', updateTimeUi);- models.compare.events.on('toggle-state', onLayerUpdate);+ if (models.compare) {+ models.compare.events.on('toggle-state', onLayerUpdate);+ }+models.layers.events.on('change', onLayerUpdate);// Determine maximum end date and move tl pick there if selected date is