From e3e7fce70a48fc2e9589e45cc662657bfcae503c Mon Sep 17 00:00:00 2001 From: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com> Date: Thu, 12 May 2022 08:43:27 -0400 Subject: [PATCH] [bug:euvr] Self-hosted instance hiding subscription nav item (#1669) --- src/app/settings/settings.component.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/settings/settings.component.ts b/src/app/settings/settings.component.ts index 8b806ab649..9756ba41ad 100644 --- a/src/app/settings/settings.component.ts +++ b/src/app/settings/settings.component.ts @@ -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); } }