From 0cb955cc0b8894cd6f99dcdfdd12e5b82ed56b1d Mon Sep 17 00:00:00 2001 From: Rajiv Sahal Date: Tue, 3 Dec 2024 21:14:42 +0530 Subject: [PATCH] fix: build failure for v4.7.15 (#17968) * fix: type error causing broken build * fix typings * fixup! fix typings * fixup! fixup! fix typings --------- Co-authored-by: Morgan Vernay --- packages/features/bookings/Booker/types.ts | 2 +- packages/platform/atoms/booker/BookerWebWrapper.tsx | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/features/bookings/Booker/types.ts b/packages/features/bookings/Booker/types.ts index a467355cb1..7f2d3c4157 100644 --- a/packages/features/bookings/Booker/types.ts +++ b/packages/features/bookings/Booker/types.ts @@ -90,7 +90,7 @@ export interface BookerProps { teamMemberEmail?: string | null; crmOwnerRecordType?: string | null; crmAppSlug?: string | null; - areInstantMeetingParametersSet?: boolean; + areInstantMeetingParametersSet?: boolean | null; userLocale?: string | null; } diff --git a/packages/platform/atoms/booker/BookerWebWrapper.tsx b/packages/platform/atoms/booker/BookerWebWrapper.tsx index 03e0653104..3983b048b4 100644 --- a/packages/platform/atoms/booker/BookerWebWrapper.tsx +++ b/packages/platform/atoms/booker/BookerWebWrapper.tsx @@ -181,10 +181,13 @@ export const BookerWebWrapper = (props: BookerWebWrapperAtomProps) => { theme: event.data?.profile.theme, }); - const areInstantMeetingParametersSet = !!event.data?.instantMeetingParameters - ? searchParams && - event.data.instantMeetingParameters.every((param) => Array.from(searchParams.values()).includes(param)) - : true; + const areInstantMeetingParametersSet = Boolean( + event.data?.instantMeetingParameters && + searchParams && + event.data.instantMeetingParameters?.every?.((param) => + Array.from(searchParams.values()).includes(param) + ) + ); return (