Unverified Commit 5f5c9a08 authored by Zack Tanner's avatar Zack Tanner Committed by GitHub

ensure `fetchServerResponse` is a valid record when stored in router cache (#55690)

Since these values are inserted into the cache and read with
`readRecordValue`, they need to have a `status` property otherwise it'll
be re-thrown in `navigate-reducer`. Investigating if this resolves an
issue where under certain circumstances navigations get stuck
suspending.

Closes NEXT-1643
parent b8112406
......@@ -319,7 +319,14 @@ export function navigateReducer(
treePatch,
// eslint-disable-next-line no-loop-func
() =>
fetchServerResponse(url, currentTree, state.nextUrl, state.buildId)
createRecordFromThenable(
fetchServerResponse(
url,
currentTree,
state.nextUrl,
state.buildId
)
)
)
}
......
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