aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/UserStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/stores/UserStore.js')
-rw-r--r--src/stores/UserStore.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/stores/UserStore.js b/src/stores/UserStore.js
index 6e6f745c7..b652098f9 100644
--- a/src/stores/UserStore.js
+++ b/src/stores/UserStore.js
@@ -161,11 +161,11 @@ export default class UserStore extends Store {
161 } 161 }
162 162
163 @computed get isPremiumOverride() { 163 @computed get isPremiumOverride() {
164 return (!this.team.plan && this.isPremium) || (this.team.state === 'expired' && this.isPremium); 164 return ((!this.team || !this.team.plan) && this.isPremium) || (this.team.state === 'expired' && this.isPremium);
165 } 165 }
166 166
167 @computed get isPersonal() { 167 @computed get isPersonal() {
168 if (!this.team.plan) return false; 168 if (!this.team || !this.team.plan) return false;
169 const plan = getPlan(this.team.plan); 169 const plan = getPlan(this.team.plan);
170 170
171 return plan === PLANS.PERSONAL; 171 return plan === PLANS.PERSONAL;
@@ -174,7 +174,7 @@ export default class UserStore extends Store {
174 @computed get isPro() { 174 @computed get isPro() {
175 if (this.isPremiumOverride) return true; 175 if (this.isPremiumOverride) return true;
176 176
177 if ((!this.team.plan || this.team.state === 'expired')) return false; 177 if (!this.team || (!this.team.plan || this.team.state === 'expired')) return false;
178 const plan = getPlan(this.team.plan); 178 const plan = getPlan(this.team.plan);
179 179
180 return plan === PLANS.PRO || plan === PLANS.LEGACY; 180 return plan === PLANS.PRO || plan === PLANS.LEGACY;