Scheduling infrastructure for absolutely everyone.
fix: Cannot read properties of undefined (reading 'timeZone') (#18107)
Praash6178092878b6
diff --git a/packages/lib/CalEventParser.ts b/packages/lib/CalEventParser.tsindex 97c9335709d..4872ddd0bca 100644--- a/packages/lib/CalEventParser.ts+++ b/packages/lib/CalEventParser.ts@@ -24,14 +24,18 @@ export const getWhen = (calEvent: Pick<CalendarEvent, "organizer" | "attendees" | "seatsPerTimeSlot">,t: TFunction) => {+ const organizerTimezone = calEvent.organizer?.timeZone ?? "UTC";+ const defaultTimezone = organizerTimezone;+ const attendeeTimezone = calEvent.attendees?.[0]?.timeZone ?? defaultTimezone;+return calEvent.seatsPerTimeSlot? `${t("organizer_timezone")}:-${calEvent.organizer.timeZone}+${organizerTimezone}`: `${t("invitee_timezone")}:-${calEvent.attendees[0].timeZone}+${attendeeTimezone}`;};