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)); + } } }