From 47f99f8f3a31e277ed93f64a3f57386d67a920f7 Mon Sep 17 00:00:00 2001 From: Sarka Rezacova Date: Fri, 24 Sep 2021 11:54:30 +0200 Subject: [PATCH] Show date if dataDate does not exist on timeline --- frontend/src/screens/Map/TimeSeriesSlider.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/screens/Map/TimeSeriesSlider.js b/frontend/src/screens/Map/TimeSeriesSlider.js index 8a85901..7c1dea1 100644 --- a/frontend/src/screens/Map/TimeSeriesSlider.js +++ b/frontend/src/screens/Map/TimeSeriesSlider.js @@ -80,9 +80,10 @@ const debounceSourceChange = debounce(changeModifiedLayerSource, 200); const TimeSeriesSlider = ({ availableDates, modifiedLayer }) => { const marks = []; const labels = []; - const { dataDate } = availableDates[0]; + let dataDate; for (let i = 0; i < availableDates.length; i++) { + dataDate = availableDates[i].dataDate; if (i === 0 || i === availableDates.length - 1) { if (dataDate) { marks.push({