mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Don't barf if we we can't get a given room ID
This commit is contained in:
parent
67d3368e1e
commit
2eba2280d8
@ -113,7 +113,9 @@ module.exports = {
|
|||||||
roomMembers: function(limit) {
|
roomMembers: function(limit) {
|
||||||
if (!this.props.roomId) return {};
|
if (!this.props.roomId) return {};
|
||||||
var cli = MatrixClientPeg.get();
|
var cli = MatrixClientPeg.get();
|
||||||
var all_members = cli.getRoom(this.props.roomId).currentState.members;
|
var room = cli.getRoom(this.props.roomId);
|
||||||
|
if (!room) return {};
|
||||||
|
var all_members = room.currentState.members;
|
||||||
var all_user_ids = Object.keys(all_members);
|
var all_user_ids = Object.keys(all_members);
|
||||||
|
|
||||||
all_user_ids.sort(function(userIdA, userIdB) {
|
all_user_ids.sort(function(userIdA, userIdB) {
|
||||||
|
Loading…
Reference in New Issue
Block a user