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.

Update update-partner-profile.ts

Tim Wilson094ffacd87d0
diff --git a/apps/web/lib/actions/partners/update-partner-profile.ts b/apps/web/lib/actions/partners/update-partner-profile.ts
index 7884142910..b503f14126 100644
--- a/apps/web/lib/actions/partners/update-partner-profile.ts
+++ b/apps/web/lib/actions/partners/update-partner-profile.ts
@@ -57,7 +57,10 @@ export const updatePartnerProfileAction = authPartnerActionClient
salesChannels,
} = parsedInput;
- if (profileType === "company" && !companyName)
+ if (
+ profileType === "company" &&
+ (companyName === undefined ? !partner.companyName : !companyName)
+ )
throw new Error("Legal company name is required.");
// Delete the Stripe Express account if needed