Skip to content

Commit a985738

Browse files
authored
fix(sveltekit): Remove invalid return in fetch proxy script (#8835)
Fixes a bug where we incorrectly returned from the sveltekit fetch proxy Html script.
1 parent ff26887 commit a985738

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/sveltekit/src/server/handle.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,10 @@ function sendErrorToSentry(e: unknown): unknown {
5959

6060
const FETCH_PROXY_SCRIPT = `
6161
const f = window.fetch;
62-
if(!f){return}
63-
window._sentryFetchProxy = function(...a){return f(...a)}
64-
window.fetch = function(...a){return window._sentryFetchProxy(...a)}
62+
if(f){
63+
window._sentryFetchProxy = function(...a){return f(...a)}
64+
window.fetch = function(...a){return window._sentryFetchProxy(...a)}
65+
}
6566
`;
6667

6768
export const transformPageChunk: NonNullable<ResolveOptions['transformPageChunk']> = ({ html }) => {

0 commit comments

Comments
 (0)