MCPcopy Create free account
hub / github.com/getsentry/sentry-javascript / restoreFetch

Function restoreFetch

packages/sveltekit/src/client/sdk.ts:83–89  ·  view source on GitHub ↗

* Restores the function @param actualFetch to `window.fetch` * and puts our fetch proxy back onto `window._sentryFetchProxy`.

(actualFetch: typeof fetch)

Source from the content-addressed store, hash-verified

81 * and puts our fetch proxy back onto `window._sentryFetchProxy`.
82 */
83function restoreFetch(actualFetch: typeof fetch): void {
84 const globalWithSentryFetchProxy: WindowWithSentryFetchProxy = WINDOW;
85
86 // eslint-disable-next-line @typescript-eslint/unbound-method
87 globalWithSentryFetchProxy._sentryFetchProxy = globalWithSentryFetchProxy.fetch;
88 globalWithSentryFetchProxy.fetch = actualFetch;
89}

Callers 1

initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected