fix autoconnect for set url.

This commit is contained in:
Miroslav Šedivý 2023-05-01 00:07:15 +02:00
parent 2ee592baf3
commit 645c4aa184

View File

@ -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) {