Skip to content

Commit 1b46785

Browse files
committed
revert client head search
1 parent d8c4ec8 commit 1b46785

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

packages/next/src/client/components/router-reducer/reducers/find-head-in-cache.ts

-22
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,7 @@ function findHeadInCacheImpl(
2020
return [cache, keyPrefix]
2121
}
2222

23-
// First try the 'children' parallel route if it exists
24-
// when starting from the "root", this corresponds with the main page component
25-
if (parallelRoutes.children) {
26-
const [segment, childParallelRoutes] = parallelRoutes.children
27-
const childSegmentMap = cache.parallelRoutes.get('children')
28-
if (childSegmentMap) {
29-
const cacheKey = createRouterCacheKey(segment)
30-
const cacheNode = childSegmentMap.get(cacheKey)
31-
if (cacheNode) {
32-
const item = findHeadInCacheImpl(
33-
cacheNode,
34-
childParallelRoutes,
35-
keyPrefix + '/' + cacheKey
36-
)
37-
if (item) return item
38-
}
39-
}
40-
}
41-
42-
// if we didn't find metadata in the page slot, check the other parallel routes
4323
for (const key in parallelRoutes) {
44-
if (key === 'children') continue // already checked above
45-
4624
const [segment, childParallelRoutes] = parallelRoutes[key]
4725
const childSegmentMap = cache.parallelRoutes.get(key)
4826
if (!childSegmentMap) {

packages/next/src/server/app-render/app-render.tsx

-7
Original file line numberDiff line numberDiff line change
@@ -503,13 +503,6 @@ async function generateDynamicRSCPayload(
503503
serveStreamingMetadata,
504504
})
505505

506-
// const { StreamingMetadata, StaticMetadata } =
507-
// createRootMetadata(() => {
508-
// return (
509-
510-
// )
511-
// }, serveStreamingMetadata)
512-
513506
flightData = (
514507
await walkTreeWithFlightRouterState({
515508
ctx,

0 commit comments

Comments
 (0)