Skip to content

Commit

Permalink
🐛 Fix tail call recursion in core util (#684)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wil Wilsman authored Dec 17, 2021
1 parent 470419d commit f868a2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ export function waitFor(predicate, options) {
throw new Error(`Timeout of ${timeout}ms exceeded.`);
} else if (!predicate()) {
yield new Promise(r => setTimeout(r, poll));
yield* check(start);
return yield* check(start);
} else if (idle && !done) {
yield new Promise(r => setTimeout(r, idle));
yield* check(start, true);
return yield* check(start, true);
}
}(Date.now()));
}

0 comments on commit f868a2e

Please sign in to comment.