From 645c4aa184905aeb20d4313293b0c09adaab0813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Mon, 1 May 2023 00:07:15 +0200 Subject: [PATCH] fix autoconnect for set url. --- src/component/main.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/component/main.vue b/src/component/main.vue index feb0ef3d..c1749321 100644 --- a/src/component/main.vue +++ b/src/component/main.vue @@ -310,11 +310,13 @@ // save token to state Vue.set(this.state.connection, 'token', token) - if (!this.autologin) return - await this.authenticate() - - if (!this.autoconnect) return - this.connect() + // try to authenticate and connect + if (this.autoconnect) { + try { + await this.authenticate() + this.connect() + } catch {} + } } public async authenticate(token?: string) {