From 1af118a44323fb1c6b1f77392fed324ee24d4db9 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 4 Sep 2020 16:27:39 +0200 Subject: [PATCH] don't assume we have a timeline --- src/matrix/room/Room.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/matrix/room/Room.js b/src/matrix/room/Room.js index 7cfe4307..6339b62c 100644 --- a/src/matrix/room/Room.js +++ b/src/matrix/room/Room.js @@ -92,7 +92,9 @@ export class Room extends EventEmitter { this._roomEncryption = this._createRoomEncryption(this, encryptionParams); if (this._roomEncryption) { this._sendQueue.enableEncryption(this._roomEncryption); - this._timeline.enableEncryption(this._decryptEntries.bind(this)); + if (this._timeline) { + this._timeline.enableEncryption(this._decryptEntries.bind(this)); + } } }