Skip to content

Scheduling infrastructure for absolutely everyone.

fix: issue in the event location field (#15229)

Anik Dhabal Babu25da11c49756
diff --git a/apps/web/components/eventtype/Locations.tsx b/apps/web/components/eventtype/Locations.tsx
index 159d5fc6083..eebf5302e0d 100644
--- a/apps/web/components/eventtype/Locations.tsx
+++ b/apps/web/components/eventtype/Locations.tsx
@@ -243,6 +243,10 @@ const Locations: React.FC<LocationsProps> = ({
eventLocationType.organizerInputType ||
!validLocations?.find((location) => location.type === newLocationType);
+ const shouldUpdateLink =
+ eventLocationType?.organizerInputType === "text" &&
+ eventLocationType.defaultValueVariable === "link";
+
if (canAddLocation) {
updateLocationField(index, {
type: newLocationType,
@@ -250,6 +254,9 @@ const Locations: React.FC<LocationsProps> = ({
credentialId: e.credentialId,
teamName: e.teamName ?? undefined,
}),
+ ...(shouldUpdateLink && {
+ link: "",
+ }),
});
} else {
updateLocationField(index, {