Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
3c0fd70f
Unverified
Commit
3c0fd70f
authored
Jul 08, 2026
by
Sebastian "Sebbie" Silbermann
Committed by
GitHub
Jul 08, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Consistently gate navigation-testing-lock API on flag (#95582)
parent
da06078b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
navigation-testing-lock.ts
...lient/components/segment-cache/navigation-testing-lock.ts
+5
-2
No files found.
packages/next/src/client/components/segment-cache/navigation-testing-lock.ts
View file @
3c0fd70f
...
@@ -138,7 +138,10 @@ export type NavigationLockState = {
...
@@ -138,7 +138,10 @@ export type NavigationLockState = {
let lockState: NavigationLockState | null = null
let lockState: NavigationLockState | null = null
export function getPreLockFetch(): typeof fetch | null {
export function getPreLockFetch(): typeof fetch | null {
return lockState !== null ? lockState.fetch : null
if (process.env.__NEXT_EXPOSE_TESTING_API && lockState !== null) {
return lockState.fetch
}
return null
}
}
/**
/**
...
@@ -297,7 +300,7 @@ function releaseLock(): void {
...
@@ -297,7 +300,7 @@ function releaseLock(): void {
* NOTE: This override only affects environments where the Instant Navigation
* NOTE: This override only affects environments where the Instant Navigation
* Testing API is enabled. It has no impact on live production behavior.
* Testing API is enabled. It has no impact on live production behavior.
*/
*/
export
function globalFetchOverride(
function globalFetchOverride(
input: RequestInfo | URL,
input: RequestInfo | URL,
init?: RequestInit
init?: RequestInit
): Promise<Response> {
): Promise<Response> {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment