perf: Improved buildDateRanges performance + cleanup (#10610)

Co-authored-by: Carina Wollendorfer <[email protected]>
This commit is contained in:
Alex van AndelandCarina Wollendorfer authored and GitHub committed 2023-08-07 19:03:01 -07:00
1 parent 6b536030fa
commit e5f15cb1df
3 files changed
+2 -17

No files matched your search

+1 -1
View File
@@ -93,7 +93,7 @@ export function buildDateRanges({
...groupedDateOverrides,
}).map(
// remove 0-length overrides that were kept to cancel out working dates until now.
(ranges) => ranges.filter((range) => !range.start.isSame(range.end))
(ranges) => ranges.filter((range) => range.start.valueOf() !== range.end.valueOf())
);
return dateRanges.flat();