Skip to content

fix: use origin for path-absolute URLs in router.replace/push - #91670

Open
nehaaprasad wants to merge 1 commit into
vercel:canaryfrom
nehaaprasad:fix/rout-plc-init-que-prm-hsh-bare
Open

nehaaprasad wants to merge 1 commit into
vercel:canaryfrom
nehaaprasad:fix/rout-plc-init-que-prm-hsh-bare

Conversation

@nehaaprasad

Copy link
Copy Markdown
Contributor

What?

  • Use location.origin for absolute hrefs.
  • Keep location.href for relative hrefs.

Why?

  • Avoid query/hash carry-over.
  • Make URL resolution explicit.

How?

  • Updated app-router-instance.
  • Updated app-router-utils.

Closes : #91658

@nextjs-bot

Copy link
Copy Markdown
Contributor

Allow CI Workflow Run

  • approve CI run for commit: a3d5eda

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

router.replace() restores initial URL query params/hash when replacing with a bare path

2 participants