1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00

move error handling to caller

This commit is contained in:
Bruno Windels
2018-07-19 15:04:05 +02:00
parent 6061deac37
commit d95d44dc94
2 changed files with 3 additions and 7 deletions

View File

@@ -762,13 +762,13 @@ MatrixClient.prototype.getRoom = function(roomId) {
* in case lazy loading of memberships is in use.
* @param {string} roomId The room ID
*/
MatrixClient.prototype.loadRoomMembersIfNeeded = function(roomId) {
MatrixClient.prototype.loadRoomMembersIfNeeded = async function(roomId) {
const room = this.getRoom(roomId);
if (!room || !room.membersNeedLoading()) {
return;
}
const membersPromise = this.joinedMembers(roomId);
room.setLazilyLoadedMembers(membersPromise);
await room.setLazilyLoadedMembers(membersPromise);
};
/**