Skip to content

Commit

Permalink
fix(core/utils): callUntilEnd may continue running after endFunc is c…
Browse files Browse the repository at this point in the history
…alled
  • Loading branch information
xiaodong2008 committed Oct 16, 2024
1 parent 60254c8 commit 5e4353d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/core/src/utils/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ export async function callUntilEnd(
if (res instanceof Promise) {
res = await res;
}
end = !!res;
if (!end) {
if (end || !res) {
setTimeout(callFunc, timeout);
} else resolve();
} catch (error: any) {
Expand Down

0 comments on commit 5e4353d

Please sign in to comment.