Unverified Commit 3411e998 authored by Andrew Clark's avatar Andrew Clark Committed by GitHub

Remove leaf segment force-refetch check (#90836)

Remove the `parallelRoutesKeys.length === 0` condition from
`renderComponentsOnThisLevel` in walk-tree-with-flight-router-state.

This check was added to support the behavior where clicking the same
link twice forces all page segments to re-render on the server. This
should no longer be necessary because the client already adds a refetch
marker on those segments, so there's no need to special-case leaf
segments on the server side.
parent 34fdcbb4
...@@ -99,8 +99,6 @@ export async function walkTreeWithFlightRouterState({ ...@@ -99,8 +99,6 @@ export async function walkTreeWithFlightRouterState({
!flightRouterState || !flightRouterState ||
// Segment in router state does not match current segment // Segment in router state does not match current segment
!matchSegment(actualSegment, flightRouterState[0]) || !matchSegment(actualSegment, flightRouterState[0]) ||
// Last item in the tree
parallelRoutesKeys.length === 0 ||
// Explicit refresh // Explicit refresh
flightRouterState[3] === 'refetch' flightRouterState[3] === 'refetch'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment