[#78] fixed undefined email

This commit is contained in:
Camille Moussu
2025-09-09 14:52:51 +02:00
parent 3d48cd7fd7
commit 3e9530a0a5
+4 -1
View File
@@ -71,7 +71,10 @@ export const putEventAsync = createAsyncThunk<
{ calId: string; events: CalendarEvent[] }, // Return type
{ cal: Calendars; newEvent: CalendarEvent } // Arg type
>("calendars/putEvent", async ({ cal, newEvent }) => {
const response = await putEvent(newEvent);
const response = await putEvent(
newEvent,
cal.ownerEmails ? cal.ownerEmails[0] : undefined
);
const eventDate = new Date(newEvent.start);
const weekStart = new Date(eventDate);