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

Fix early return in MatrixClient.setGuestAccess

(as well as a similar bug in the test suite)

Turns out that `q.all(a, b)` === `q.all([a])`, rather than `q.all([a,b])`: it
only waits for the *first* promise - which means that `client.setGuestAccess`
would swallow any errors returned from the API.
This commit is contained in:
Richard van der Hoff
2017-07-10 17:14:52 +01:00
parent 3294f4858a
commit 9558845e6e
2 changed files with 5 additions and 3 deletions

View File

@@ -2153,7 +2153,7 @@ MatrixClient.prototype.setGuestAccess = function(roomId, opts) {
});
}
return q.all(readPromise, writePromise);
return q.all([readPromise, writePromise]);
};
// Registration/Login operations