From a77390f17faee3dcc06770cea1cf3d9569f91529 Mon Sep 17 00:00:00 2001 From: ernstmul Date: Thu, 10 Oct 2024 09:45:19 +0200 Subject: [PATCH] Fix nullpointer --- .../organization-[organization]/billing/planSummary.svelte | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/routes/(console)/organization-[organization]/billing/planSummary.svelte b/src/routes/(console)/organization-[organization]/billing/planSummary.svelte index 252a1ef3c..f715a3898 100644 --- a/src/routes/(console)/organization-[organization]/billing/planSummary.svelte +++ b/src/routes/(console)/organization-[organization]/billing/planSummary.svelte @@ -30,6 +30,7 @@ extraMembers = members.total > 1 ? members.total - 1 : 0; currentPlan = await sdk.forConsole.billing.getPlan($organization?.$id); + console.log(currentPlan); }); $: extraUsage = (currentInvoice?.amount ?? 0) - (currentPlan?.price ?? 0); @@ -58,7 +59,7 @@ {tierToPlan($organization?.billingPlan)?.name} plan
- {isTrial ? formatCurrency(0) : formatCurrency(currentPlan?.price)} + {isTrial ? formatCurrency(0) : formatCurrency(currentPlan?.price)}!
{#if $organization?.billingPlan !== BillingPlan.FREE && extraUsage > 0} @@ -85,7 +86,7 @@
Additional members
{formatCurrency( - extraMembers * currentPlan.addons.member.price + extraMembers * currentPlan?.addons?.member?.price )}