From b8e3b549f896ec7fcb427af6f7eb1b8ca2e63782 Mon Sep 17 00:00:00 2001 From: Hariom Balhara Date: Thu, 28 Sep 2023 15:21:18 +0530 Subject: [PATCH] Fix failing bookings (#11574) --- packages/core/EventManager.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/core/EventManager.ts b/packages/core/EventManager.ts index 70e56c0095..f7bf1b65b5 100644 --- a/packages/core/EventManager.ts +++ b/packages/core/EventManager.ts @@ -119,8 +119,9 @@ export default class EventManager { // Fallback to Cal Video if Google Meet is selected w/o a Google Cal // @NOTE: destinationCalendar it's an array now so as a fallback we will only check the first one - const [mainHostDestinationCalendar] = evt.destinationCalendar ?? []; - if (evt.location === MeetLocationType && mainHostDestinationCalendar.integration !== "google_calendar") { + const [mainHostDestinationCalendar] = + (evt.destinationCalendar as [undefined | NonNullable[number]]) ?? []; + if (evt.location === MeetLocationType && mainHostDestinationCalendar?.integration !== "google_calendar") { evt["location"] = "integrations:daily"; } const isDedicated = evt.location ? isDedicatedIntegration(evt.location) : null;