diff --git a/web/js/components/timeline/timeline-coverage/coverage-item-container.js b/web/js/components/timeline/timeline-coverage/coverage-item-container.js index 3f188c7bef..935147c722 100644 --- a/web/js/components/timeline/timeline-coverage/coverage-item-container.js +++ b/web/js/components/timeline/timeline-coverage/coverage-item-container.js @@ -72,7 +72,7 @@ class CoverageItemContainer extends Component { dateIntervalStartDates.forEach((dateIntStartDate) => { const dateIntTime = new Date(dateIntStartDate).getTime(); // allow overwriting of subsequent date ranges - if (dateIntTime >= startDateTime && dateIntTime < endDateTime) { + if (dateIntTime >= startDateTime && dateIntTime <= endDateTime) { const dateIntFormatted = dateIntStartDate.toISOString(); multiCoverageDates[dateIntFormatted] = { date: dateIntFormatted, diff --git a/web/js/components/timeline/timeline-coverage/coverage-item-list.js b/web/js/components/timeline/timeline-coverage/coverage-item-list.js index 0c797f1f5c..0dd9349b39 100644 --- a/web/js/components/timeline/timeline-coverage/coverage-item-list.js +++ b/web/js/components/timeline/timeline-coverage/coverage-item-list.js @@ -262,9 +262,7 @@ class CoverageItemList extends Component { const endGreaterThanOrEqualToStartDateLimit = new Date(rangeEnd).getTime() >= startDateLimit.getTime(); if (startLessThanOrEqualToEndDateLimit && endGreaterThanOrEqualToStartDateLimit) { // check layer date array cache and use caches date array if available, if not add date array - if (!this.layerDateArrayCache[id]) { - this.layerDateArrayCache[id] = {}; - } + this.layerDateArrayCache[id] ??= {}; const layerIdDates = `${appNow.toISOString()}-${frontDate}-${backDate}`; if (this.layerDateArrayCache[id][layerIdDates] === undefined) {