fix error on conduit with state field that is missing when empty

This commit is contained in:
Bruno Windels 2020-08-21 19:10:28 +02:00
parent a64d49a8a2
commit 5d21ae3fb7

View file

@ -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) {