aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/FeaturesStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/stores/FeaturesStore.js')
-rw-r--r--src/stores/FeaturesStore.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/stores/FeaturesStore.js b/src/stores/FeaturesStore.js
index 59abeb218..9480e27ab 100644
--- a/src/stores/FeaturesStore.js
+++ b/src/stores/FeaturesStore.js
@@ -7,6 +7,8 @@ import delayApp from '../features/delayApp';
7import spellchecker from '../features/spellchecker'; 7import spellchecker from '../features/spellchecker';
8import serviceProxy from '../features/serviceProxy'; 8import serviceProxy from '../features/serviceProxy';
9 9
10import { DEFAULT_FEATURES_CONFIG } from '../config';
11
10export default class FeaturesStore extends Store { 12export default class FeaturesStore extends Store {
11 @observable defaultFeaturesRequest = new CachedRequest(this.api.features, 'default'); 13 @observable defaultFeaturesRequest = new CachedRequest(this.api.features, 'default');
12 @observable featuresRequest = new CachedRequest(this.api.features, 'features'); 14 @observable featuresRequest = new CachedRequest(this.api.features, 'features');
@@ -22,10 +24,10 @@ export default class FeaturesStore extends Store {
22 24
23 @computed get features() { 25 @computed get features() {
24 if (this.stores.user.isLoggedIn) { 26 if (this.stores.user.isLoggedIn) {
25 return this.featuresRequest.execute().result || {}; 27 return this.featuresRequest.execute().result || DEFAULT_FEATURES_CONFIG;
26 } 28 }
27 29
28 return this.defaultFeaturesRequest.execute().result || {}; 30 return this.defaultFeaturesRequest.execute().result || DEFAULT_FEATURES_CONFIG;
29 } 31 }
30 32
31 _monitorLoginStatus() { 33 _monitorLoginStatus() {