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
567d6050
Commit
567d6050
authored
Jan 31, 2026
by
Zack Tanner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add handling to skip prefetch payloads if partial
parent
bc1adb24
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
ppr-navigations.ts
...t/src/client/components/router-reducer/ppr-navigations.ts
+15
-1
No files found.
packages/next/src/client/components/router-reducer/ppr-navigations.ts
View file @
567d6050
...
...
@@ -1073,6 +1073,14 @@ function createCacheNodeForSegment(
doesSegmentNeedDynamicRequest
=
isCachedRscPartial
}
if
(
isCachedRscPartial
)
{
// Partial prefetch payloads may include unresolved thenables that never
// resolve during prefetch. We must not render them as initial UI, or a
// Suspense boundary can remain stuck in its fallback indefinitely. Only
// the dynamic response should fulfill missing data.
prefetchRsc
=
null
}
// If this is a page segment, we need to do the same for the head. This
// follows analogous logic to the segment data above.
// TODO: We don't need to store the head on the page segment's CacheNode; we
...
...
@@ -1082,10 +1090,10 @@ function createCacheNodeForSegment(
let
prefetchHead
:
HeadData
|
null
=
null
let
head
:
React
.
ReactNode
|
null
=
null
let
doesHeadNeedDynamicRequest
:
boolean
=
isPage
let
isCachedHeadPartial
:
boolean
=
true
if
(
isPage
)
{
let
cachedHead
:
HeadData
|
null
=
null
let
isCachedHeadPartial
:
boolean
=
true
if
(
metadataVaryPath
!==
null
)
{
const
metadataEntry
=
readSegmentCacheEntry
(
now
,
metadataVaryPath
)
if
(
metadataEntry
!==
null
)
{
...
...
@@ -1154,6 +1162,12 @@ function createCacheNodeForSegment(
}
}
if
(
isPage
&&
isCachedHeadPartial
)
{
// Same rationale as prefetchRsc: avoid rendering partial head data that may
// contain unresolved thenables.
prefetchHead
=
null
}
// Now that we're creating a new segment, write its data to the BFCache. A
// subsequent back/forward navigation will reuse this same data, until or
// unless it's cleared by a refresh/revalidation.
...
...
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