diff options
Diffstat (limited to 'src/stores/AppStore.js')
-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 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 | ||