diff --git a/src/stores/room-list/RoomListStore.ts b/src/stores/room-list/RoomListStore.ts index 5775e685fd..3f415f946d 100644 --- a/src/stores/room-list/RoomListStore.ts +++ b/src/stores/room-list/RoomListStore.ts @@ -302,6 +302,9 @@ export class RoomListStoreClass extends AsyncStoreWithClient { } else if (payload.action === 'MatrixActions.Event.decrypted') { const eventPayload = (payload); // TODO: Type out the dispatcher types const roomId = eventPayload.event.getRoomId(); + if (!roomId) { + return; + } const room = this.matrixClient.getRoom(roomId); if (!room) { console.warn(`Event ${eventPayload.event.getId()} was decrypted in an unknown room ${roomId}`);