mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-29 12:55:21 +01:00
[bug:euvr] Self-hosted instance hiding subscription nav item (#1669)
This commit is contained in:
parent
74bdfe2602
commit
e3e7fce70a
@ -54,7 +54,11 @@ export class SettingsComponent implements OnInit, OnDestroy {
|
||||
this.premium = await this.tokenService.getPremium();
|
||||
this.hasFamilySponsorshipAvailable = await this.organizationService.canManageSponsorships();
|
||||
const hasPremiumFromOrg = await this.stateService.getCanAccessPremium();
|
||||
const billing = await this.apiService.getUserBillingHistory();
|
||||
this.hideSubscription = !this.premium && hasPremiumFromOrg && billing.hasNoHistory;
|
||||
let billing = null;
|
||||
if (!this.selfHosted) {
|
||||
billing = await this.apiService.getUserBillingHistory();
|
||||
}
|
||||
this.hideSubscription =
|
||||
!this.premium && hasPremiumFromOrg && (this.selfHosted || billing?.hasNoHistory);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user