From 04e62a10e601dcc8d7c74458df9d14749df93cfe Mon Sep 17 00:00:00 2001 From: Hariom Balhara Date: Thu, 10 Nov 2022 16:37:16 +0530 Subject: [PATCH] In selfhosted, calvideo isnt default and thus an event can be created without location. Handle that (#5457) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- apps/web/pages/team/[slug]/book.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/pages/team/[slug]/book.tsx b/apps/web/pages/team/[slug]/book.tsx index 957cafbba8..44c9fcfbd4 100644 --- a/apps/web/pages/team/[slug]/book.tsx +++ b/apps/web/pages/team/[slug]/book.tsx @@ -85,7 +85,7 @@ export async function getServerSideProps(context: GetServerSidePropsContext) { const eventType = { ...eventTypeRaw, //TODO: Use zodSchema to verify it instead of using Type Assertion - locations: privacyFilteredLocations(eventTypeRaw.locations as LocationObject[]), + locations: privacyFilteredLocations((eventTypeRaw.locations || []) as LocationObject[]), recurringEvent: parseRecurringEvent(eventTypeRaw.recurringEvent), };