From b188368e8ff79a21f1958e4996d01a72d191ef78 Mon Sep 17 00:00:00 2001 From: Alex van Andel Date: Fri, 25 Nov 2022 17:13:42 +0000 Subject: [PATCH] Defaults to !!eventType.schedule (#5688) --- apps/web/pages/event-types/[type]/index.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/apps/web/pages/event-types/[type]/index.tsx b/apps/web/pages/event-types/[type]/index.tsx index 7a577ec2d9..70de98159c 100644 --- a/apps/web/pages/event-types/[type]/index.tsx +++ b/apps/web/pages/event-types/[type]/index.tsx @@ -172,7 +172,17 @@ const EventTypePage = (props: inferSSRProps) => { findDurationType(eventType.minimumBookingNotice), eventType.minimumBookingNotice ), - metadata: eventType.metadata, + // fallback to !!eventType.schedule when 'useHostSchedulesForTeamEvent' is undefined + metadata: { + ...eventType.metadata, + config: { + ...eventType.metadata.config, + useHostSchedulesForTeamEvent: + typeof eventType.metadata.config?.useHostSchedulesForTeamEvent !== "undefined" + ? eventType.metadata.config?.useHostSchedulesForTeamEvent === true + : !!eventType.schedule, + }, + }, }, });