diff --git a/src/utils/KeyVerificationStateObserver.js b/src/utils/KeyVerificationStateObserver.js index 7da532109c..a29d2ea1aa 100644 --- a/src/utils/KeyVerificationStateObserver.js +++ b/src/utils/KeyVerificationStateObserver.js @@ -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; }