Merge pull request #381 from vector-im/bwindels/fix-fail-to-load-at-top-with-zero-entries
Don't assume there is at least 1 tile before loading at top
This commit is contained in:
commit
41b4c31a7f
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ export class TimelineViewModel extends ViewModel {
|
|||
return true;
|
||||
}
|
||||
const firstTile = this._tiles.getFirst();
|
||||
if (firstTile.shape === "gap") {
|
||||
if (firstTile?.shape === "gap") {
|
||||
return await firstTile.fill();
|
||||
} else {
|
||||
const topReached = await this._timeline.loadAtTop(10);
|
||||
|
|
Reference in a new issue