diff options
author | fangebee <78966083+fangebee@users.noreply.github.com> | 2021-05-18 15:06:50 +0300 |
---|---|---|
committer | fangebee <78966083+fangebee@users.noreply.github.com> | 2021-05-18 15:06:50 +0300 |
commit | 63d7e4c20f36a42e12c07e4c048f774b35d2426f (patch) | |
tree | 5783041f6666388b1cfcad9ab887d089a791d4f2 | |
parent | db9ccf7bd342cca4f3fabd96b4a56639c6a1da00 (diff) |
Fetch user settings before deciding to show LoginBox
-rw-r--r-- | ts/Bootstrap.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ts/Bootstrap.ts b/ts/Bootstrap.ts index 8b742d9..9f60244 100644 --- a/ts/Bootstrap.ts +++ b/ts/Bootstrap.ts @@ -136,15 +136,15 @@ export default class Bootstrap { } private async onUserRequestsToGoOnline() { - if (!Storage.get().getItem('serverIsOmniscient') && OJSXC_CONFIG.serverType !== 'internal') { - this.jsxc.showLoginBox(); - - return; - } - try { let settings = await Settings.loadConnection(undefined, undefined); + if (!Storage.get().getItem('serverIsOmniscient') && OJSXC_CONFIG.serverType !== 'internal') { + this.jsxc.showLoginBox(); + + return; + } + if (!settings) { throw new Error('No settings provided'); } |