Skip to content

Commit 5e4353d

Browse files
committed
fix(core/utils): callUntilEnd may continue running after endFunc is called
1 parent 60254c8 commit 5e4353d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/core/src/utils/basic.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ export async function callUntilEnd(
1818
if (res instanceof Promise) {
1919
res = await res;
2020
}
21-
end = !!res;
22-
if (!end) {
21+
if (end || !res) {
2322
setTimeout(callFunc, timeout);
2423
} else resolve();
2524
} catch (error: any) {

0 commit comments

Comments
 (0)