mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix(billing): fix error when currentPlan or organization is undefined
When going from /account to /organization/[organization]/change-plan, the currentPlan and organization variables may not be defined as the states are still being set. This change ensures an error isn't thrown so that the states can update fully.
This commit is contained in:
@@ -241,9 +241,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
$: isUpgrade = $plansInfo.get(selectedPlan).order > $currentPlan.order;
|
||||
$: isDowngrade = $plansInfo.get(selectedPlan).order < $currentPlan.order;
|
||||
$: isButtonDisabled = $organization.billingPlan === selectedPlan;
|
||||
$: isUpgrade = $plansInfo.get(selectedPlan).order > $currentPlan?.order;
|
||||
$: isDowngrade = $plansInfo.get(selectedPlan).order < $currentPlan?.order;
|
||||
$: isButtonDisabled = $organization?.billingPlan === selectedPlan;
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
||||
Reference in New Issue
Block a user