forked from mystiq/hydrogen-web
Guard entry from storage being processed by method
This commit is contained in:
parent
bf6dfcfcad
commit
73733ce145
2 changed files with 5 additions and 1 deletions
|
@ -274,7 +274,7 @@ export class Timeline {
|
|||
*/
|
||||
for (const entry of entries) {
|
||||
const relatedEntry = this._contextEntriesNotInTimeline.get(entry.relatedEventId);
|
||||
if (relatedEntry?.addRelation(entry)) {
|
||||
if (relatedEntry?.isNonPersisted && relatedEntry?.addRelation(entry)) {
|
||||
// update other entries for which this entry is a context entry
|
||||
relatedEntry.contextForEntries?.forEach(e => {
|
||||
this._remoteEntries.findAndUpdate(te => te.id === e.id, () => "contextEntry");
|
||||
|
|
|
@ -27,4 +27,8 @@ export class NonPersistedEventEntry extends EventEntry {
|
|||
get entryIndex() {
|
||||
throw new Error("Cannot access entryIndex for non-persisted EventEntry");
|
||||
}
|
||||
|
||||
get isNonPersisted() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue