1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-11 05:53:42 +00:00

feat(billing): close premium org upgrade dialog if feature is disabled

This commit is contained in:
Stephon Brown
2026-02-04 18:38:22 -05:00
parent d48ec4c0ba
commit c66876f39f

View File

@@ -122,6 +122,11 @@ export class PremiumOrgUpgradeDialogComponent implements OnInit {
) {}
async ngOnInit(): Promise<void> {
if (!this.showPremiumToOrganizationUpgrade()) {
// If the premium to organization upgrade feature is not enabled or user does not have premium personally, close the dialog
this.close({ status: PremiumOrgUpgradeDialogStatus.Closed });
return;
}
this.account.set(this.params.account);
this.step.set(this.params.initialStep ?? PremiumOrgUpgradeDialogStep.PlanSelection);
this.selectedPlan.set(this.params.selectedPlan ?? null);