diff options
author | vantezzen <hello@vantezzen.io> | 2019-10-27 10:17:47 +0100 |
---|---|---|
committer | vantezzen <hello@vantezzen.io> | 2019-10-27 10:17:47 +0100 |
commit | a0ac009c44b210df4d79ffedbdd892fe7302d22e (patch) | |
tree | e74b4aa156a6da0311d5fe82b954ea76723c4919 /src/stores/UserStore.js | |
parent | Improve hero picture (diff) | |
download | ferdium-app-a0ac009c44b210df4d79ffedbdd892fe7302d22e.tar.gz ferdium-app-a0ac009c44b210df4d79ffedbdd892fe7302d22e.tar.zst ferdium-app-a0ac009c44b210df4d79ffedbdd892fe7302d22e.zip |
#146 Add possible fix for 1.1.1.1 hack
Diffstat (limited to 'src/stores/UserStore.js')
-rw-r--r-- | src/stores/UserStore.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/stores/UserStore.js b/src/stores/UserStore.js index d6a2e5fde..ec0b0cf8d 100644 --- a/src/stores/UserStore.js +++ b/src/stores/UserStore.js | |||
@@ -348,7 +348,12 @@ export default class UserStore extends Store { | |||
348 | // Reactions | 348 | // Reactions |
349 | async _getUserData() { | 349 | async _getUserData() { |
350 | if (this.isLoggedIn) { | 350 | if (this.isLoggedIn) { |
351 | const data = await this.getUserInfoRequest.execute()._promise; | 351 | let data; |
352 | try { | ||
353 | data = await this.getUserInfoRequest.execute()._promise; | ||
354 | } catch (e) { | ||
355 | return false; | ||
356 | } | ||
352 | 357 | ||
353 | // We need to set the beta flag for the SettingsStore | 358 | // We need to set the beta flag for the SettingsStore |
354 | this.actions.settings.update({ | 359 | this.actions.settings.update({ |
@@ -408,7 +413,11 @@ export default class UserStore extends Store { | |||
408 | } | 413 | } |
409 | 414 | ||
410 | async _migrateUserLocale() { | 415 | async _migrateUserLocale() { |
411 | await this.getUserInfoRequest._promise; | 416 | try { |
417 | await this.getUserInfoRequest._promise; | ||
418 | } catch (e) { | ||
419 | return false; | ||
420 | } | ||
412 | 421 | ||
413 | if (!this.data.locale) { | 422 | if (!this.data.locale) { |
414 | debug('Migrate "locale" to user data'); | 423 | debug('Migrate "locale" to user data'); |