diff --git a/src/matrix/room/timeline/persistence/SyncWriter.js b/src/matrix/room/timeline/persistence/SyncWriter.js index 7dd53129..84e8a18f 100644 --- a/src/matrix/room/timeline/persistence/SyncWriter.js +++ b/src/matrix/room/timeline/persistence/SyncWriter.js @@ -119,7 +119,7 @@ export class SyncWriter { const changedMembers = []; // persist state const {state} = roomResponse; - if (state.events) { + if (Array.isArray(state?.events)) { for (const event of state.events) { const member = this._writeStateEvent(event, txn); if (member) {