aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/AppStore.js
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2017-12-11 10:40:08 +0100
committerLibravatar GitHub <noreply@github.com>2017-12-11 10:40:08 +0100
commit2624fa16900651665a4e62315985c08c52dcf147 (patch)
treefb6599dbceec795dbf8fafde804f422e2ee95631 /src/stores/AppStore.js
parentfix missing webview wrapper class (diff)
parentfix(Translations): Re-add Spanish to available languages. (diff)
downloadferdium-app-2624fa16900651665a4e62315985c08c52dcf147.tar.gz
ferdium-app-2624fa16900651665a4e62315985c08c52dcf147.tar.zst
ferdium-app-2624fa16900651665a4e62315985c08c52dcf147.zip
Merge pull request #421 from meetfranz/feature/bugfixing
[PR] General bugfixing
Diffstat (limited to 'src/stores/AppStore.js')
-rw-r--r--src/stores/AppStore.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js
index 3e6d4d288..5a6c12ee1 100644
--- a/src/stores/AppStore.js
+++ b/src/stores/AppStore.js
@@ -263,8 +263,10 @@ export default class AppStore extends Store {
263 _setLocale() { 263 _setLocale() {
264 const locale = this.stores.settings.all.locale; 264 const locale = this.stores.settings.all.locale;
265 265
266 if (locale && locale !== this.locale) { 266 if (locale && Object.prototype.hasOwnProperty.call(locales, locale) && locale !== this.locale) {
267 this.locale = locale; 267 this.locale = locale;
268 } else if (!locale) {
269 this.locale = this._getDefaultLocale();
268 } 270 }
269 } 271 }
270 272
@@ -289,6 +291,10 @@ export default class AppStore extends Store {
289 locale = defaultLocale; 291 locale = defaultLocale;
290 } 292 }
291 293
294 if (!locale) {
295 locale = DEFAULT_APP_SETTINGS.fallbackLocale;
296 }
297
292 return locale; 298 return locale;
293 } 299 }
294 300