cater for an undefined MatrixClient on rooms

pull/21833/head
Germain Souquet 2021-06-10 12:15:55 +01:00
parent 6606a1142d
commit 9731e275f8
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ import EventTileBubble from "../messages/EventTileBubble";
import { ROOM_SECURITY_TAB } from "../dialogs/RoomSettingsDialog";
function hasExpectedEncryptionSettings(room): boolean {
const isEncrypted: boolean = room._client.isRoomEncrypted(room.roomId);
const isEncrypted: boolean = room._client?.isRoomEncrypted(room.roomId);
const isPublic: boolean = room.getJoinRule() === "public";
return isPublic || !privateShouldBeEncrypted() || isEncrypted;
}