File tree 2 files changed +6
-3
lines changed
packages/next/src/server/lib 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -30,11 +30,11 @@ type PatchedFetcher = Fetcher & {
30
30
readonly _nextOriginalFetch : Fetcher
31
31
}
32
32
33
- const nextPatchSymbol = Symbol . for ( 'next-patch' )
33
+ export const NEXT_PATCH_SYMBOL = Symbol . for ( 'next-patch' )
34
34
35
35
function isFetchPatched ( ) {
36
36
// @ts -ignore
37
- return globalThis [ nextPatchSymbol ] === true
37
+ return globalThis [ NEXT_PATCH_SYMBOL ] === true
38
38
}
39
39
40
40
export function validateRevalidate (
@@ -796,7 +796,7 @@ function createPatchedFetcher(
796
796
patched . __nextGetStaticStore = ( ) => staticGenerationAsyncStorage
797
797
patched . _nextOriginalFetch = originFetch
798
798
// @ts -ignore
799
- globalThis [ nextPatchSymbol ] = true
799
+ globalThis [ NEXT_PATCH_SYMBOL ] = true
800
800
801
801
return patched
802
802
}
Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ import { normalizeMetadataPageToRoute } from '../../../lib/metadata/get-metadata
89
89
import { createEnvDefinitions } from '../experimental/create-env-definitions'
90
90
import { JsConfigPathsPlugin } from '../../../build/webpack/plugins/jsconfig-paths-plugin'
91
91
import { store as consoleStore } from '../../../build/output/store'
92
+ import { NEXT_PATCH_SYMBOL } from '../patch-fetch'
92
93
93
94
export type SetupOpts = {
94
95
renderServer : LazyRenderServerInstance
@@ -185,6 +186,8 @@ async function startWatcher(opts: SetupOpts) {
185
186
const originalFetch = global . fetch
186
187
const resetFetch = ( ) => {
187
188
global . fetch = originalFetch
189
+ // @ts -ignore
190
+ global [ NEXT_PATCH_SYMBOL ] = false
188
191
}
189
192
190
193
const hotReloader : NextJsHotReloaderInterface = opts . turbo
You can’t perform that action at this time.
0 commit comments