Defaults to !!eventType.schedule (#5688)

revert-5676-CAL-445
Alex van Andel 2022-11-25 17:13:42 +00:00 committed by GitHub
parent e35631aee3
commit b188368e8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 1 deletions

View File

@ -172,7 +172,17 @@ const EventTypePage = (props: inferSSRProps<typeof getServerSideProps>) => {
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,
},
},
},
});