From bc0baac9bcbc60e86780b5b8fed904c8b40bba6e Mon Sep 17 00:00:00 2001 From: Steven Nguyen Date: Thu, 5 Jun 2025 17:14:46 -0700 Subject: [PATCH] fix: update isNewOrg logic on apply-credit page The logic was for an existing org, but the variable name was isNewOrg. This commit updates the logic to match the variable name. --- src/routes/(console)/apply-credit/+page.svelte | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/routes/(console)/apply-credit/+page.svelte b/src/routes/(console)/apply-credit/+page.svelte index 1c86a2c5d..9f18e6cd8 100644 --- a/src/routes/(console)/apply-credit/+page.svelte +++ b/src/routes/(console)/apply-credit/+page.svelte @@ -246,14 +246,12 @@ billingPlan = getBillingPlan(); } - $: isNewOrg = selectedOrgId && selectedOrgId !== newOrgId; + $: isNewOrg = !(selectedOrgId && selectedOrgId !== newOrgId); - $: { - if (isNewOrg) { - (async () => { - currentPlan = await sdk.forConsole.billing.getOrganizationPlan(selectedOrgId); - })(); - } + $: if (!isNewOrg) { + (async () => { + currentPlan = await sdk.forConsole.billing.getOrganizationPlan(selectedOrgId); + })(); } // after adding a payment method, fetch the payment methods again so the input can be updated @@ -371,7 +369,7 @@ {collaborators} bind:couponData bind:billingBudget - organizationId={isNewOrg ? selectedOrgId : null}> + organizationId={!isNewOrg ? selectedOrgId : null}> {#if campaign?.template === 'review' && (campaign?.cta || campaign?.claimed || campaign?.unclaimed)}

{campaign?.cta}