Unverified Commit ed9435cd authored by Jimmy Lai's avatar Jimmy Lai Committed by GitHub

parallel routes: fix HMR refetch issue (#47343)

- I noticed that on parallel routes, we kept refetching all the time the tree
- this was caused by the HMR ping interval + a mismatch on how we recreated the entrypoint path from the router state, causing the server to always invalidate the parallel route
- this fixes it to respect the format




fix NEXT-860 ([link](https://linear.app/vercel/issue/NEXT-860))
parent 316638bc
...@@ -54,7 +54,7 @@ function treePathToEntrypoint( ...@@ -54,7 +54,7 @@ function treePathToEntrypoint(
const path = const path =
(parentPath ? parentPath + '/' : '') + (parentPath ? parentPath + '/' : '') +
(parallelRouteKey !== 'children' && !segment.startsWith('@') (parallelRouteKey !== 'children' && !segment.startsWith('@')
? parallelRouteKey + '/' ? `@${parallelRouteKey}/`
: '') + : '') +
(segment === '' ? 'page' : segment) (segment === '' ? 'page' : segment)
......
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