Skip to content

Commit

Permalink
app-router: fix stale cache handling (#49160)
Browse files Browse the repository at this point in the history
There was a bug reported in #42991 (comment) that would hang on load. 

After investigation, I noticed that it was because the cache node never applied the flight payload. It was because the requested flight payload was too deep into the tree whereas it should have been fetched from higher up in the tree because we specifically discarded that branch of the tree because it was stale.
  • Loading branch information
feedthejim committed May 3, 2023
1 parent 1e75bea commit 1905d14
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -288,7 +288,8 @@ export function navigateReducer(
currentCache,
flightSegmentPath,
treePatch,
() => fetchServerResponse(url, newTree!, state.nextUrl)
// eslint-disable-next-line no-loop-func
() => fetchServerResponse(url, currentTree, state.nextUrl)
)
}

Expand Down

0 comments on commit 1905d14

Please sign in to comment.