diff --git a/apps/web/src/app/billing/individual/upgrade/unified-upgrade-dialog/unified-upgrade-dialog.component.html b/apps/web/src/app/billing/individual/upgrade/unified-upgrade-dialog/unified-upgrade-dialog.component.html
index 6cffd818af..3e7b797f00 100644
--- a/apps/web/src/app/billing/individual/upgrade/unified-upgrade-dialog/unified-upgrade-dialog.component.html
+++ b/apps/web/src/app/billing/individual/upgrade/unified-upgrade-dialog/unified-upgrade-dialog.component.html
@@ -1,6 +1,6 @@
@if (step() == PlanSelectionStep) {
-} @else if (step() == PaymentStep && selectedPlan() !== null) {
+} @else if (step() == PaymentStep && selectedPlan() !== null && account() !== null) {
@@ -24,10 +24,10 @@
-
+
@if (premiumCardDetails) {
@if (passwordManager) {
diff --git a/apps/web/src/app/billing/individual/upgrade/upgrade-payment/upgrade-payment.component.ts b/apps/web/src/app/billing/individual/upgrade/upgrade-payment/upgrade-payment.component.ts
index 8aaced5e1f..81a4c9191a 100644
--- a/apps/web/src/app/billing/individual/upgrade/upgrade-payment/upgrade-payment.component.ts
+++ b/apps/web/src/app/billing/individual/upgrade/upgrade-payment/upgrade-payment.component.ts
@@ -118,27 +118,24 @@ export class UpgradePaymentComponent implements OnInit, AfterViewInit {
tier: this.selectedPlanId(),
details: planDetails,
};
+ this.passwordManager = {
+ name: this.isFamiliesPlan ? "familiesMembership" : "premiumMembership",
+ cost: this.selectedPlan.details.passwordManager.annualPrice,
+ quantity: 1,
+ cadence: "year",
+ };
+
+ this.upgradeToMessage = this.i18nService.t(
+ this.isFamiliesPlan ? "upgradeToFamilies" : "upgradeToPremium",
+ );
+
+ this.estimatedTax = 0;
+ } else {
+ this.complete.emit({ status: UpgradePaymentStatus.Closed, organizationId: null });
+ return;
}
});
- if (!this.selectedPlan) {
- this.complete.emit({ status: UpgradePaymentStatus.Closed, organizationId: null });
- return;
- }
-
- this.passwordManager = {
- name: this.isFamiliesPlan ? "familiesMembership" : "premiumMembership",
- cost: this.selectedPlan.details.passwordManager.annualPrice,
- quantity: 1,
- cadence: "year",
- };
-
- this.upgradeToMessage = this.i18nService.t(
- this.isFamiliesPlan ? "upgradeToFamilies" : "upgradeToPremium",
- );
-
- this.estimatedTax = 0;
-
this.formGroup.valueChanges
.pipe(debounceTime(1000), takeUntilDestroyed(this.destroyRef))
.subscribe(() => this.refreshSalesTax());
@@ -146,7 +143,9 @@ export class UpgradePaymentComponent implements OnInit, AfterViewInit {
}
ngAfterViewInit(): void {
- this.cartSummaryComponent.isExpanded.set(false);
+ if (this.cartSummaryComponent) {
+ this.cartSummaryComponent.isExpanded.set(false);
+ }
}
protected get isPremiumPlan(): boolean {