mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 19:45:05 +01:00
don't assume localEntries exists, as load races with sync.afterSync
This commit is contained in:
parent
23321b4c76
commit
bb6905bdcd
@ -159,7 +159,9 @@ export class Timeline {
|
|||||||
// Once the subscription is setup, MappedList will set up the local
|
// Once the subscription is setup, MappedList will set up the local
|
||||||
// relations as needed with _applyAndEmitLocalRelationChange,
|
// relations as needed with _applyAndEmitLocalRelationChange,
|
||||||
// so we're not missing anything by bailing out.
|
// so we're not missing anything by bailing out.
|
||||||
if (!this._localEntries.hasSubscriptions) {
|
//
|
||||||
|
// _localEntries can also not yet exist
|
||||||
|
if (!this._localEntries?.hasSubscriptions) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// find any local relations to this new remote event
|
// find any local relations to this new remote event
|
||||||
@ -301,4 +303,4 @@ export function tests() {
|
|||||||
assert.equal(Array.from(timeline.entries)[0].isRedacting, true);
|
assert.equal(Array.from(timeline.entries)[0].isRedacting, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user