mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-01-11 12:37:22 +01:00
Enclose in try..finally
Signed-off-by: RMidhunSuresh <hi@midhun.dev>
This commit is contained in:
parent
7e8c0109ae
commit
a8a04d4036
@ -70,8 +70,13 @@ export class TimelineViewModel extends ViewModel {
|
||||
onReset: (idx, tile) => checkForUpdate(idx, tile)
|
||||
};
|
||||
this.tiles.subscribe(subscription);
|
||||
const gapResult = await gapPromise;
|
||||
this.tiles.unsubscribe(subscription);
|
||||
let gapResult;
|
||||
try {
|
||||
gapResult = await gapPromise;
|
||||
}
|
||||
finally {
|
||||
this.tiles.unsubscribe(subscription);
|
||||
}
|
||||
if (!gapResult) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user