Skip to content

Commit

Permalink
Allow zero-length ranges to be rendered
Browse files Browse the repository at this point in the history
  • Loading branch information
PatchesMaps committed Nov 13, 2024
1 parent 4d8396e commit 5c9a7f5
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 5c9a7f5

Please sign in to comment.