Skip to content

Commit ec1f16e

Browse files
committed
fix: construct signal correctly
1 parent 205e85f commit ec1f16e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/next/src/server/lib/dedupe-fetch.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,11 @@ export function createDedupeFetch(originalFetch: typeof fetch) {
104104
// doesn't include all the options in this environment. We also pass a
105105
// signal down to the original fetch as to bypass the underlying React fetch
106106
// cache.
107-
const signal = new AbortSignal()
108-
const promise = originalFetch(resource, { ...options, signal })
107+
const controller = new AbortController()
108+
const promise = originalFetch(resource, {
109+
...options,
110+
signal: controller.signal,
111+
})
109112
const entry: CacheEntry = [cacheKey, promise, null]
110113
cacheEntries.push(entry)
111114

0 commit comments

Comments
 (0)