Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/fetch/src/lib.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ export { ReadableStream, Blob, FormData } from './package.js';

// Marking export as a DOM File object instead of custom class.
export const fetch = /** @type {typeof globalThis.fetch} */
(typeof globalThis.fetch === "function" ? globalThis.fetch : WebFetch.fetch)
(typeof globalThis.fetch === "function" ? globalThis.fetch.bind(globalThis) : WebFetch.fetch)

export const Headers = globalThis.Headers || WebFetch.Headers
export const Request = globalThis.Request || WebFetch.Request
export const Response = global.Response || WebFetch.Response
export const Response = globalThis.Response || WebFetch.Response

export default fetch