encountered this very unlikely race while testing, so prevent it

This commit is contained in:
Bruno Windels 2020-10-13 13:10:35 +02:00
parent db5c98a706
commit c8dd7b42e7

View File

@ -75,6 +75,9 @@ export class Timeline {
// tries to prepend `amount` entries to the `entries` list.
async loadAtTop(amount) {
if (this._disposables.isDisposed) {
return;
}
const firstEventEntry = this._remoteEntries.array.find(e => !!e.eventType);
if (!firstEventEntry) {
return;