From 79cb21f4c0654e3052ae0d93ba3373eae1b4094a Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Thu, 2 Dec 2021 10:48:48 +0000 Subject: [PATCH] Check the deleted room exists before refreshing --- src/matrix/Sync3.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/matrix/Sync3.ts b/src/matrix/Sync3.ts index af51c9bf..2ba7b52a 100644 --- a/src/matrix/Sync3.ts +++ b/src/matrix/Sync3.ts @@ -368,7 +368,9 @@ export class Sync3 { // However, I failed to reproduce this so ¯\_(ツ)_/¯¯ deletedRoomIDs.concat(addedRoomIDs).forEach((roomId) => { let room = this.session.rooms.get(roomId); - room.forceRefresh(); + if (room) { + room.forceRefresh(); + } }) // END sync v3 specific