Skip to content

Commit a227198

Browse files
committed
fix: form date error validation
1 parent cdc8505 commit a227198

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

frontend/components/event-dialog/edit-event-view.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ export function EditEventView({ event, setOpen }: EditEventViewProps) {
8989
title: event?.title ?? "",
9090
description: event?.description ?? "",
9191
date: event?.from,
92-
from: formatToHHMM(new Date(event?.from)),
93-
to: formatToHHMM(new Date(event?.to)),
92+
from: event?.from ? formatToHHMM(new Date(event.from)) : "",
93+
to: event?.to ? formatToHHMM(new Date(event.to)) : "",
9494
needsTutors: event?.needsTutors,
95-
topic: event?.topic.name,
96-
type: event?.type.name,
95+
topic: event?.topic.name ?? "",
96+
type: event?.type.name ?? "",
9797
},
9898
});
9999

0 commit comments

Comments
 (0)