mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
encountered this very unlikely race while testing, so prevent it
This commit is contained in:
parent
db5c98a706
commit
c8dd7b42e7
@ -75,6 +75,9 @@ export class Timeline {
|
|||||||
|
|
||||||
// tries to prepend `amount` entries to the `entries` list.
|
// tries to prepend `amount` entries to the `entries` list.
|
||||||
async loadAtTop(amount) {
|
async loadAtTop(amount) {
|
||||||
|
if (this._disposables.isDisposed) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const firstEventEntry = this._remoteEntries.array.find(e => !!e.eventType);
|
const firstEventEntry = this._remoteEntries.array.find(e => !!e.eventType);
|
||||||
if (!firstEventEntry) {
|
if (!firstEventEntry) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user