Skip to content

Commit

Permalink
Fix Infinity Recursion
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-jelly committed Dec 5, 2024
1 parent 1f49556 commit 8402bf7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32136,7 +32136,7 @@ __webpack_unused_export__ = setGlobalDispatcher
__webpack_unused_export__ = getGlobalDispatcher

const fetchImpl = (__nccwpck_require__(730).fetch)
__webpack_unused_export__ = async function fetch (init, options = undefined) {
module.exports.he = async function fetch (init, options = undefined) {
try {
return await fetchImpl(init, options)
} catch (err) {
Expand Down Expand Up @@ -62243,7 +62243,7 @@ function fetchWithRetry(url, options, retries = 3) {
let lastError;
for (let i = 0; i < retries; i++) {
try {
const res = await fetchWithRetry(url, options);
const res = await (0,undici/* fetch */.he)(url, options);
if (res.ok) return resolve(res);
lastError = new Error(`HTTP ${res.status} ${res.statusText}`);
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function fetchWithRetry(url, options, retries = 3) {
let lastError;
for (let i = 0; i < retries; i++) {
try {
const res = await fetchWithRetry(url, options);
const res = await fetch(url, options);
if (res.ok) return resolve(res);
lastError = new Error(`HTTP ${res.status} ${res.statusText}`);
} catch (error) {
Expand Down

0 comments on commit 8402bf7

Please sign in to comment.