Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

fix regression

Steven Tey14cd2b6b3ba7
diff --git a/apps/web/ui/modals/add-edit-link-modal/index.tsx b/apps/web/ui/modals/add-edit-link-modal/index.tsx
index 62ef98f8ac..ca1cf3a32f 100644
--- a/apps/web/ui/modals/add-edit-link-modal/index.tsx
+++ b/apps/web/ui/modals/add-edit-link-modal/index.tsx
@@ -92,13 +92,14 @@ function AddEditLinkModal({
);
useEffect(() => {
- if (primaryDomain) {
+ // for a new link (no props or duplicateProps), set the domain to the primary domain
+ if (primaryDomain && !props && !duplicateProps) {
setData((prev) => ({
...prev,
domain: primaryDomain,
}));
}
- }, [primaryDomain]);
+ }, [primaryDomain, props, duplicateProps]);
const { domain, key, url, password, proxy } = data;