aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2018-03-28 10:07:31 +0200
committerLibravatar Stefan Malzner <stefan@adlk.io>2018-03-28 10:07:31 +0200
commit04145fb473d929c6b80fcb9a66c635a6af7382a8 (patch)
treef3c2e8a2d01aa658e290c5e059b661355a49dd9d /src/stores
parentAdd beta and locale settings to app config as well (diff)
downloadferdium-app-04145fb473d929c6b80fcb9a66c635a6af7382a8.tar.gz
ferdium-app-04145fb473d929c6b80fcb9a66c635a6af7382a8.tar.zst
ferdium-app-04145fb473d929c6b80fcb9a66c635a6af7382a8.zip
Fix issue with endless data fetching loop when user logs out
Diffstat (limited to 'src/stores')
-rw-r--r--src/stores/AppStore.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js
index 3c6c24b59..ea1e71bdc 100644
--- a/src/stores/AppStore.js
+++ b/src/stores/AppStore.js
@@ -282,7 +282,11 @@ export default class AppStore extends Store {
282 } 282 }
283 283
284 _setLocale() { 284 _setLocale() {
285 const { locale } = this.stores.user.data; 285 let locale;
286 if (this.stores.user.isLoggedIn) {
287 locale = this.stores.user.data.locale;
288 }
289
286 290
287 if (locale && Object.prototype.hasOwnProperty.call(locales, locale) && locale !== this.locale) { 291 if (locale && Object.prototype.hasOwnProperty.call(locales, locale) && locale !== this.locale) {
288 this.locale = locale; 292 this.locale = locale;