don't look in remoteEntries when already found

This commit is contained in:
Bruno Windels 2022-01-14 19:05:30 +01:00
parent 7197e5427f
commit 3d00881508

View File

@ -323,7 +323,9 @@ export class Timeline {
// before looking into remoteEntries, check the entries
// that about to be added first
let contextEvent = entries.find(e => e.id === id);
contextEvent = this._findLoadedEventById(id);
if (!contextEvent) {
contextEvent = this._findLoadedEventById(id);
}
if (contextEvent) {
entry.setContextEntry(contextEvent);
// we don't emit an update here, as the add or update