Skip to content

Commit

Permalink
fix: make sure to swallow error from attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards1211 committed Oct 5, 2022
1 parent 8c7328f commit b0c9cf2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function poll<T>(
resolve(value)
}

async function attempt(): Promise<void> {
async function _attempt(): Promise<void> {
let result, error
const now = Date.now()
try {
Expand Down Expand Up @@ -82,6 +82,8 @@ function poll<T>(
}
}

const attempt = () => _attempt().catch(() => {})

attempt()
}
)
Expand Down

0 comments on commit b0c9cf2

Please sign in to comment.