1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-29 16:43:09 +03:00

make busyChanged optional

This commit is contained in:
David Baker
2019-06-10 16:24:20 +01:00
parent c80518bf3e
commit 0412ca5810

View File

@@ -147,9 +147,9 @@ InteractiveAuth.prototype = {
// if we have no flows, try a request (we'll have // if we have no flows, try a request (we'll have
// just a session ID in _data if resuming) // just a session ID in _data if resuming)
if (!this._data.flows) { if (!this._data.flows) {
this._busyChangedCallback(true); if (this._busyChangedCallback) this._busyChangedCallback(true);
this._doRequest(this._data).finally(() => { this._doRequest(this._data).finally(() => {
this._busyChangedCallback(false); if (this._busyChangedCallback) this._busyChangedCallback(false);
}); });
} else { } else {
this._startNextAuthStage(); this._startNextAuthStage();
@@ -273,7 +273,7 @@ InteractiveAuth.prototype = {
await this._submitPromise; await this._submitPromise;
} finally { } finally {
this._submitPromise = null; this._submitPromise = null;
if (!background) this._busyChangedCallback(false); if (!background && this._busyChangedCallback) this._busyChangedCallback(false);
} }
}, },