diff options
Diffstat (limited to 'src/stores')
-rw-r--r-- | src/stores/AppStore.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index 17ec832cf..dcdb11a12 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -255,8 +255,10 @@ export default class AppStore extends Store { | |||
255 | _setLocale() { | 255 | _setLocale() { |
256 | const locale = this.stores.settings.all.locale; | 256 | const locale = this.stores.settings.all.locale; |
257 | 257 | ||
258 | if (locale && locale !== this.locale) { | 258 | if (locale && Object.prototype.hasOwnProperty.call(locales, locale) && locale !== this.locale) { |
259 | this.locale = locale; | 259 | this.locale = locale; |
260 | } else if (!locale) { | ||
261 | this.locale = this._getDefaultLocale(); | ||
260 | } | 262 | } |
261 | } | 263 | } |
262 | 264 | ||
@@ -281,6 +283,10 @@ export default class AppStore extends Store { | |||
281 | locale = defaultLocale; | 283 | locale = defaultLocale; |
282 | } | 284 | } |
283 | 285 | ||
286 | if (!locale) { | ||
287 | locale = DEFAULT_APP_SETTINGS.fallbackLocale; | ||
288 | } | ||
289 | |||
284 | return locale; | 290 | return locale; |
285 | } | 291 | } |
286 | 292 | ||