mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
Fixes https://github.com/vercel/next.js/issues/65970 ---- The browser update happens at https://github.com/vercel/next.js/blob/10d5c278bc0e9eab067df7b5f3943c12ab54a6a9/packages/next/src/client/components/app-router.tsx#L685, which sets the browser location to `canonicalUrl`. `canonicalUrl` was correctly set at https://github.com/vercel/next.js/blob/ab03c3261f53fcff1fb3387673cfd170a626564c/packages/next/src/client/components/router-reducer/reducers/refresh-reducer.ts#L98, but then mistakenly overriden at https://github.com/vercel/next.js/blob/51549d92de3069b6dc5cd1f5fcdc04d5b1cbf37a/packages/next/src/client/components/router-reducer/reducers/refresh-reducer.ts#L129. This PR fixes that and includes an E2E test to prevent future regression. --------- Co-authored-by: JJ Kasper <[email protected]> Co-authored-by: Zack Tanner <[email protected]>