The Open Source DocuSign Alternative.
TypeScript digital-signaturedocument-signingdocusign-alternativee-signatureesignesignaturenext-authnextjsopen-sourcepades-standardpdfpdf-signpdf-signaturepostgresqlprismaself-hostedsigningtypescript
fix: stripe customer fetch logic
David Nguyen6d7fc32075fd
diff --git a/apps/web/src/app/(dashboard)/settings/billing/create-billing-portal.action.ts b/apps/web/src/app/(dashboard)/settings/billing/create-billing-portal.action.tsindex 98c3d2a96..331943648 100644--- a/apps/web/src/app/(dashboard)/settings/billing/create-billing-portal.action.ts+++ b/apps/web/src/app/(dashboard)/settings/billing/create-billing-portal.action.ts@@ -26,8 +26,10 @@ export const createBillingPortal = async () => {}}- // Fallback to check if a Stripe customer already exists for the current user.- stripeCustomer = await getStripeCustomerByEmail(user.email);+ // Fallback to check if a Stripe customer already exists for the current user email.+ if (!stripeCustomer) {+ stripeCustomer = await getStripeCustomerByEmail(user.email);+ }// Create a Stripe customer if it does not exist for the current user.if (!stripeCustomer) {