Skip to content

Commit

Permalink
Added '?' operator to fix possible null error
Browse files Browse the repository at this point in the history
  • Loading branch information
danetsao committed Sep 21, 2023
1 parent df57a75 commit 7d2841c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/forms/CalendarForm/validation/validateExceptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,10 @@ export function validateExceptionInterOverlaps(
rows.map((row) => ({
i: row.i,
startDate: dayjs
.min(row.rows.map(({ startDate }) => dayjs(startDate)))
.min(row.rows.map(({ startDate }) => dayjs?.(startDate)))
.startOf('day'),
endDate: dayjs
.max(row.rows.map(({ endDate }) => dayjs(endDate)))
.max(row.rows.map(({ endDate }) => dayjs?.(endDate)))
.endOf('day')
}));

Expand Down

0 comments on commit 7d2841c

Please sign in to comment.