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)
|
onReset: (idx, tile) => checkForUpdate(idx, tile)
|
||||||
};
|
};
|
||||||
this.tiles.subscribe(subscription);
|
this.tiles.subscribe(subscription);
|
||||||
const gapResult = await gapPromise;
|
let gapResult;
|
||||||
this.tiles.unsubscribe(subscription);
|
try {
|
||||||
|
gapResult = await gapPromise;
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
this.tiles.unsubscribe(subscription);
|
||||||
|
}
|
||||||
if (!gapResult) {
|
if (!gapResult) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user