Skip to content

Commit

Permalink
Allow zero-length ranges to be rendered (#5565)
Browse files Browse the repository at this point in the history
  • Loading branch information
PatchesMaps authored Nov 27, 2024
1 parent 8630d76 commit 9d8ed7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9d8ed7b

Please sign in to comment.