We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0907c03 commit cad4d02Copy full SHA for cad4d02
src/index.ts
@@ -31,7 +31,7 @@ async function poll<T>(
31
) {
32
let lastError: unknown = new Error('Polling skipped');
33
for (let i = 0; i < maxRetry; i += 1) {
34
- if (!immediate && !i) await delay(interval);
+ if (!immediate || i > 0) await delay(interval);
35
try {
36
return await check(i);
37
} catch (err) {
0 commit comments