Skip to content

Commit

Permalink
feat(node): pick globalThis.fetch when available over node-fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Nov 4, 2021
1 parent 788d247 commit 54b779b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import { createFetch } from './base'

export * from './base'

export const fetch = nodeFetch.default as any as typeof globalThis.fetch
export const fetch = globalThis.fetch || nodeFetch.default as any as typeof globalThis.fetch

export const $fetch = createFetch({ fetch })

0 comments on commit 54b779b

Please sign in to comment.