From 63d7e4c20f36a42e12c07e4c048f774b35d2426f Mon Sep 17 00:00:00 2001 From: fangebee <78966083+fangebee@users.noreply.github.com> Date: Tue, 18 May 2021 14:06:50 +0200 Subject: [PATCH] Fetch user settings before deciding to show LoginBox --- ts/Bootstrap.ts | 12 ++++++------ 1 file 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'); }