dont assume the room exist ... not sure why though

pull/21833/head
Bruno Windels 2020-01-24 14:20:48 +01:00
parent b66154330c
commit 66768416a6
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ import { _t } from '../languageHandler';
export function getNameForEventRoom(userId, roomId) {
const client = MatrixClientPeg.get();
const room = client.getRoom(roomId);
const member = room.getMember(userId);
const member = room && room.getMember(userId);
return member ? member.name : userId;
}