app-router: fix stale cache handling (#49160)
There was a bug reported in https://github.com/vercel/next.js/issues/42991#issuecomment-1532967037 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.
This commit is contained in:
parent
1e75beada2
commit
1905d14d77
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue