From 4a62cdb8fbcd5ae3010cc6a485f6ea111af9eded Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Sun, 14 Aug 2022 17:52:19 +0530 Subject: [PATCH] Await the promise --- src/domain/session/room/timeline/tiles/GapTile.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/domain/session/room/timeline/tiles/GapTile.js b/src/domain/session/room/timeline/tiles/GapTile.js index 65a01988..f41dd722 100644 --- a/src/domain/session/room/timeline/tiles/GapTile.js +++ b/src/domain/session/room/timeline/tiles/GapTile.js @@ -77,6 +77,9 @@ export class GapTile extends SimpleTile { // Don't increase depth because this gap fill was a noop continue; } + else { + canFillMore = false; + } } depth = depth + 1; } while (depth < 10 && !this._siblingChanged && canFillMore && !this.isDisposed); @@ -113,7 +116,7 @@ export class GapTile extends SimpleTile { } async _waitForReconnection() { - this.options.client.reconnector.connectionStatus.waitFor(status => status === ConnectionStatus.Online).promise; + await this.options.client.reconnector.connectionStatus.waitFor(status => status === ConnectionStatus.Online).promise; } get shape() {