Skip to content

Commit

Permalink
fix: construct signal correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
wyattjoh committed Dec 4, 2024
1 parent 205e85f commit ec1f16e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/next/src/server/lib/dedupe-fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,11 @@ export function createDedupeFetch(originalFetch: typeof fetch) {
// doesn't include all the options in this environment. We also pass a
// signal down to the original fetch as to bypass the underlying React fetch
// cache.
const signal = new AbortSignal()
const promise = originalFetch(resource, { ...options, signal })
const controller = new AbortController()
const promise = originalFetch(resource, {
...options,
signal: controller.signal,
})
const entry: CacheEntry = [cacheKey, promise, null]
cacheEntries.push(entry)

Expand Down

0 comments on commit ec1f16e

Please sign in to comment.