You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
Fix error handling in interactive-auth
Now that we are using bluebird, `defer.reject` is not implicitly bound, so we need to call it properly rather than just passing it into the catch handler. This fixes an error: promise.js:711 Uncaught TypeError: Cannot read property 'promise' of undefined
This commit is contained in:
@@ -293,7 +293,9 @@ InteractiveAuth.prototype = {
|
||||
},
|
||||
);
|
||||
if (!background) {
|
||||
prom = prom.catch(this._completionDeferred.reject);
|
||||
prom = prom.catch((e) => {
|
||||
this._completionDeferred.reject(e);
|
||||
});
|
||||
} else {
|
||||
// We ignore all failures here (even non-UI auth related ones)
|
||||
// since we don't want to suddenly fail if the internet connection
|
||||
|
||||
Reference in New Issue
Block a user