The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
fix inAppApplication condition
Steven Teyf68674030615
diff --git a/apps/web/lib/actions/partners/create-program-application.ts b/apps/web/lib/actions/partners/create-program-application.tsindex 9711afdea5..5f301a4e72 100644--- a/apps/web/lib/actions/partners/create-program-application.ts+++ b/apps/web/lib/actions/partners/create-program-application.ts@@ -179,26 +179,28 @@ export const createProgramApplicationAction = actionClientthrow new Error("This program is no longer accepting applications.");}- // for in-app applications from existing partners, we need to check- // if the partner has an incomplete profile, if so we prompt them to complete it- if (inAppApplication && existingPartner) {- const { isComplete } = getPartnerProfileChecklistProgress({- partner: {- ...existingPartner,- preferredEarningStructures:- existingPartner.preferredEarningStructures.map(- ({ preferredEarningStructure }) => preferredEarningStructure,+ if (existingPartner) {+ // for in-app applications from existing partners, we need to check+ // if the partner has an incomplete profile, if so we prompt them to complete it+ if (inAppApplication) {+ const { isComplete } = getPartnerProfileChecklistProgress({+ partner: {+ ...existingPartner,+ preferredEarningStructures:+ existingPartner.preferredEarningStructures.map(+ ({ preferredEarningStructure }) => preferredEarningStructure,+ ),+ salesChannels: existingPartner.salesChannels.map(+ ({ salesChannel }) => salesChannel,),- salesChannels: existingPartner.salesChannels.map(- ({ salesChannel }) => salesChannel,- ),- },- });+ },+ });- if (!isComplete) {- throw new Error(- "Please complete your partner profile to submit your application: https://partners.dub.co/profile",- );+ if (!isComplete) {+ throw new Error(+ "Please complete your partner profile to submit your application: https://partners.dub.co/profile",+ );+ }}return createApplicationAndEnrollment({