From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Sat, 16 Apr 2022 15:23:24 +0000 (+0530) Subject: Fix crash on unable to getContent of tombstoned room X-Git-Tag: v2.0.0~53 X-Git-Url: https://git.wafflesoft.org/?a=commitdiff_plain;h=ba0de8800a2b8528ade28b61d27cbc22a3605da2;p=cinny.git Fix crash on unable to getContent of tombstoned room --- diff --git a/src/client/state/RoomList.js b/src/client/state/RoomList.js index f1e0d6d..8b7cdc1 100644 --- a/src/client/state/RoomList.js +++ b/src/client/state/RoomList.js @@ -206,7 +206,7 @@ class RoomList extends EventEmitter { this.matrixClient.getRooms().forEach((room) => { const { roomId } = room; const tombstone = room.currentState.events.get('m.room.tombstone'); - if (typeof tombstone !== 'undefined') { + if (tombstone?.get('') !== undefined) { const repRoomId = tombstone.get('').getContent().replacement_room; const repRoomMembership = this.matrixClient.getRoom(repRoomId)?.getMyMembership(); if (repRoomMembership === 'join') return;