From 5d21ae3fb76c41ee7880b17802e03f74d4c6bad9 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 21 Aug 2020 19:10:28 +0200 Subject: [PATCH] fix error on conduit with state field that is missing when empty --- src/matrix/room/timeline/persistence/SyncWriter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {