Merge pull request #1565 from matrix-org/matthew/group-promise-npe
turn NPE on flair resolution errors into a logged errorpull/21833/head
commit
815b42f0ac
|
@ -129,7 +129,11 @@ class FlairStore extends EventEmitter {
|
||||||
}
|
}
|
||||||
const updatedUserGroups = resp.users;
|
const updatedUserGroups = resp.users;
|
||||||
usersInFlight.forEach((userId) => {
|
usersInFlight.forEach((userId) => {
|
||||||
|
if (this._usersPending[userId]) {
|
||||||
this._usersPending[userId].resolve(updatedUserGroups[userId] || []);
|
this._usersPending[userId].resolve(updatedUserGroups[userId] || []);
|
||||||
|
} else {
|
||||||
|
console.error("Promise vanished for resolving groups for " + userId);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue