Fix looking in allEntries
This commit is contained in:
parent
5c1813888c
commit
a59bf7c002
1 changed files with 5 additions and 2 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue