Skip to content

Scheduling infrastructure for absolutely everyone.

In selfhosted, calvideo isnt default and thus an event can be created without location. Handle that (#5457)

Hariom Balhara04e62a10e601
diff --git a/apps/web/pages/team/[slug]/book.tsx b/apps/web/pages/team/[slug]/book.tsx
index 957cafbba81..44c9fcfbd45 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),
};