fix: Legacy Routing Forms handling - Allow team Event in existing non-team Routing forms (#9852)

This commit is contained in:
Hariom Balhara
2023-06-30 10:58:14 -04:00
committed by GitHub
parent 000f39b9c8
commit be40e4b4b0
@@ -105,11 +105,16 @@ const Route = ({
userId: form.userId,
},
});
if (!eventTypeValidInContext) {
return;
}
group.eventTypes.forEach((eventType) => {
const uniqueSlug = `${group.profile.slug}/${eventType.slug}`;
const isRouteAlreadyInUse = isRouter(route) ? false : uniqueSlug === route.action.value;
// If Event is already in use, we let it be so as to not break the existing setup
if (!isRouteAlreadyInUse && !eventTypeValidInContext) {
return;
}
eventOptions.push({
label: uniqueSlug,
value: uniqueSlug,