From 7d2841c4fefde58243ec2c09eae8b2293aba0ae5 Mon Sep 17 00:00:00 2001 From: danetsao Date: Thu, 21 Sep 2023 12:47:45 -0500 Subject: [PATCH] Added '?' operator to fix possible null error --- src/forms/CalendarForm/validation/validateExceptions.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/forms/CalendarForm/validation/validateExceptions.tsx b/src/forms/CalendarForm/validation/validateExceptions.tsx index 01c7ed17..425367a9 100644 --- a/src/forms/CalendarForm/validation/validateExceptions.tsx +++ b/src/forms/CalendarForm/validation/validateExceptions.tsx @@ -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') }));