From 889164195358a46e70229b913acb3576bd47fcfc Mon Sep 17 00:00:00 2001 From: alannnc Date: Mon, 4 Sep 2023 13:25:39 -0700 Subject: [PATCH] hotfix: missing gCal calendarId (#11139) Co-authored-by: zomars --- packages/app-store/googlecalendar/lib/CalendarService.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/app-store/googlecalendar/lib/CalendarService.ts b/packages/app-store/googlecalendar/lib/CalendarService.ts index 755c7bcc40..e0b98b2ca0 100644 --- a/packages/app-store/googlecalendar/lib/CalendarService.ts +++ b/packages/app-store/googlecalendar/lib/CalendarService.ts @@ -144,14 +144,14 @@ export default class GoogleCalendarService implements Calendar { }); // Find in calEventRaw.destinationCalendar the one with the same credentialId - const selectedCalendar = calEventRaw.destinationCalendar?.find( - (cal) => cal.credentialId === credentialId - )?.externalId; + const selectedCalendar = + calEventRaw.destinationCalendar?.find((cal) => cal.credentialId === credentialId)?.externalId || + "primary"; calendar.events.insert( { auth: myGoogleAuth, - calendarId: selectedCalendar || "primary", + calendarId: selectedCalendar, requestBody: payload, conferenceDataVersion: 1, sendUpdates: "none",