forked from mystiq/hydrogen-web
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) {
|
||||
for (let i = 0; i < this.entries.length; i += 1) {
|
||||
const entry = this.entries.get(i);
|
||||
if (!this._allEntries) {
|
||||
// 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) {
|
||||
return entry;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue