Skip to content

Commit

Permalink
Merge pull request #3 from e1himself/patch-2
Browse files Browse the repository at this point in the history
`cached-fetch` - Fix Next.js compatibility: `global` is not defined
  • Loading branch information
y-nk authored Jan 15, 2025
2 parents 3e96e45 + 7f84545 commit 5229c8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cached-fetch/src/createFetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import { createDedupedFetch } from "./createDedupedFetch";
let _fetch: Fetch

export function createFetch() {
return _fetch ??= createDedupedFetch(createCachedFetch(global.fetch))
return _fetch ??= createDedupedFetch(createCachedFetch(globalThis.fetch))
}

0 comments on commit 5229c8e

Please sign in to comment.