Skip to content

Commit

Permalink
fix: Use window.fetch instead of unpatched fetch in load functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Lms24 committed May 22, 2023
1 parent 1c1ddd5 commit c97c2c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/kit/src/runtime/client/fetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export function initial_fetch(resource, opts) {
return Promise.resolve(new Response(body, init));
}

return native_fetch(resource, opts);
return DEV ? native_fetch(resource, opts) : window.fetch(resource, opts);
}

/**
Expand All @@ -112,7 +112,7 @@ export function subsequent_fetch(resource, resolved, opts) {
}
}

return native_fetch(resolved, opts);
return DEV ? native_fetch(resource, opts) : window.fetch(resource, opts);
}

/**
Expand Down

0 comments on commit c97c2c9

Please sign in to comment.