mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
Fix nullpointer
This commit is contained in:
1 parent
288577c9b0
commit
a77390f17f
1 file changed
+3
-2
@@ -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 @@
|
||||
<span class="body-text-2">
|
||||
{tierToPlan($organization?.billingPlan)?.name} plan</span>
|
||||
<div class="body-text-2 u-margin-inline-start-auto">
|
||||
{isTrial ? formatCurrency(0) : formatCurrency(currentPlan?.price)}
|
||||
{isTrial ? formatCurrency(0) : formatCurrency(currentPlan?.price)}!
|
||||
</div>
|
||||
</CollapsibleItem>
|
||||
{#if $organization?.billingPlan !== BillingPlan.FREE && extraUsage > 0}
|
||||
@@ -85,7 +86,7 @@
|
||||
<h5 class="body-text-2 u-stretch">Additional members</h5>
|
||||
<div>
|
||||
{formatCurrency(
|
||||
extraMembers * currentPlan.addons.member.price
|
||||
extraMembers * currentPlan?.addons?.member?.price
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user