Skip to content

Commit

Permalink
ensure fetchServerResponse is a valid record when stored in router …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
ztanner committed Sep 21, 2023
1 parent b811240 commit 5f5c9a0
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
)
)
}

Expand Down

0 comments on commit 5f5c9a0

Please sign in to comment.