Fix looking in allEntries

This commit is contained in:
RMidhunSuresh 2022-01-11 20:57:29 +05:30
parent 5c1813888c
commit a59bf7c002

View file

@ -422,8 +422,11 @@ export class Timeline {
} }
getFromAllEntriesById(eventId) { getFromAllEntriesById(eventId) {
for (let i = 0; i < this.entries.length; i += 1) { if (!this._allEntries) {
const entry = this.entries.get(i); // if allEntries isn't loaded yet, fallback to looking only in remoteEntries
return this.getByEventId(eventId);
}
for (const entry of this._allEntries) {
if (entry.id === eventId) { if (entry.id === eventId) {
return entry; return entry;
} }