fix: reinitialize api client after server URL changes
This commit is contained in:
@@ -17,7 +17,7 @@ class ApiClient {
|
||||
}
|
||||
|
||||
async init(force = false) {
|
||||
if (this.initPromise) {
|
||||
if (this.initPromise && !force) {
|
||||
return this.initPromise
|
||||
}
|
||||
|
||||
@@ -25,7 +25,9 @@ class ApiClient {
|
||||
return Promise.resolve()
|
||||
}
|
||||
|
||||
this.initPromise = this._doInit()
|
||||
this.initPromise = this._doInit().finally(() => {
|
||||
this.initPromise = null
|
||||
})
|
||||
return this.initPromise
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user