From ced24b983017681329bffd52d38f3cc9fc486623 Mon Sep 17 00:00:00 2001 From: Noah Overcash Date: Thu, 21 Sep 2023 15:10:01 -0400 Subject: [PATCH] Fix null safety error --- .../CalendarForm/validation/validateExceptions.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/forms/CalendarForm/validation/validateExceptions.tsx b/src/forms/CalendarForm/validation/validateExceptions.tsx index fa0e0b15..7a1e50f1 100644 --- a/src/forms/CalendarForm/validation/validateExceptions.tsx +++ b/src/forms/CalendarForm/validation/validateExceptions.tsx @@ -248,12 +248,12 @@ export function validateExceptionInterOverlaps( const rowMinMaxes: { i: number; startDate: Dayjs; endDate: Dayjs }[] = rows.map((row) => ({ i: row.i, - startDate: dayjs?.min( - row.rows.map(({ startDate }) => dayjs(startDate))) - .startOf('day'), - endDate: dayjs?.max( - row.rows.map(({ endDate }) => dayjs(endDate))) - .endOf('day') + startDate: dayjs + .min(row.rows.map(({ startDate }) => dayjs(startDate))) + ?.startOf('day'), + endDate: dayjs + .maxrow.rows.map(({ endDate }) => dayjs(endDate))) + ?.endOf('day') })); for (let i = 0; i < rowMinMaxes.length - 1; i++) {