We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b430020 commit 2476983Copy full SHA for 2476983
1 file changed
apps/site/util/fetch.ts
@@ -1,5 +1,3 @@
1
-import { setTimeout } from 'node:timers/promises';
2
-
3
type RetryOptions = RequestInit & {
4
maxRetry?: number;
5
delay?: number;
@@ -28,7 +26,7 @@ export const fetchWithRetry = async (
28
26
throw e;
29
27
}
30
31
- await setTimeout(delay * i);
+ await new Promise(resolve => setTimeout(resolve, delay * i));
32
33
34
};
0 commit comments