From 30e4e88b055cba0f2374d793842302840ddd3f0c Mon Sep 17 00:00:00 2001 From: Colin Toft Date: Sun, 22 Sep 2024 10:40:21 -0700 Subject: [PATCH] Disable non-null errors --- frontend/src/pages/UpcomingPage.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/UpcomingPage.tsx b/frontend/src/pages/UpcomingPage.tsx index 56ce9b7c..79989fb7 100644 --- a/frontend/src/pages/UpcomingPage.tsx +++ b/frontend/src/pages/UpcomingPage.tsx @@ -184,8 +184,10 @@ export const UpcomingCard = ({ event, setShouldReload }: { event: UpcomingEvent, setIsEditModalOpen(true); setCurrentlyEditingMealRequestId(meal?.id); }; - + + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const startDate = new Date(mealRequest!.dropOffDatetime + "Z") ?? null; + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const endDate = new Date(mealRequest!.dropOffDatetime + "Z") ?? null; if (startDate) { endDate.setHours(endDate.getHours() + 1);