From 4152b7f78687105e759912626ba3c055e70bc304 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Thu, 5 Sep 2019 11:14:51 +0200 Subject: Fix isPro state --- src/stores/UserStore.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/stores/UserStore.js') diff --git a/src/stores/UserStore.js b/src/stores/UserStore.js index d44208923..365336cbf 100644 --- a/src/stores/UserStore.js +++ b/src/stores/UserStore.js @@ -160,6 +160,10 @@ export default class UserStore extends Store { return !!this.data.isPremium; } + @computed get isPremiumOverride() { + return (!this.team.plan && this.isPremium) || (this.team.state === 'expired' && this.isPremium); + } + @computed get isPersonal() { if (!this.team.plan) return false; const plan = getPlan(this.team.plan); @@ -168,7 +172,7 @@ export default class UserStore extends Store { } @computed get isPro() { - if ((!this.team.plan || this.team.state !== 'expired') && this.isPremium) return true; + if (this.isPremiumOverride) return true; if ((!this.team.plan || this.team.state === 'expired')) return false; const plan = getPlan(this.team.plan); -- cgit v1.2.3-54-g00ecf