Skip to content

Commit

Permalink
Fix issue w/wrong setTimeout call (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Feb 19, 2021
1 parent 742d063 commit 8aa1f79
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "async-wait-until",
"version": "2.0.1",
"version": "2.0.2",
"description": "Waits for a given predicate callback to return a truthy value and resolves",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Expand Up @@ -76,7 +76,7 @@ const getScheduler = (): Scheduler => {

const cleanUp = (timer: number | NodeJS.Timeout | undefined) => {
if (timer != null) {
typeof timer === 'number' ? window.clearTimeout(timer) : global.clearTimeout(timer);
(window != null ? window : global).clearTimeout(timer as number);
}

scheduledTimer = undefined;
Expand Down

0 comments on commit 8aa1f79

Please sign in to comment.