Skip to content

[BUGFIX] Fix query param redirects during active transitions#21410

Open
olenderhub wants to merge 1 commit into
emberjs:mainfrom
olenderhub:fix/query-param-redirect-during-active-transition
Open

[BUGFIX] Fix query param redirects during active transitions#21410
olenderhub wants to merge 1 commit into
emberjs:mainfrom
olenderhub:fix/query-param-redirect-during-active-transition

Conversation

@olenderhub
Copy link
Copy Markdown
Contributor

This fixes redirecting from beforeModel to the same route with updated query params.

When a query-param-only transition was started during an active transition, the router used the query-param-only path. That could lose the updated query params from the URL or crash during direct visits.

This change avoids the query-param-only path while another transition is active, allowing the normal transition path to abort and replace the active transition.

Adds regression coverage for:

  • transition entry into the route
  • direct visit to the route

Testing

  • pnpm test:wip

Fixes #18577
Refs #19609

@olenderhub olenderhub force-pushed the fix/query-param-redirect-during-active-transition branch from 3ac87f1 to 926018d Compare May 18, 2026 16:34
@olenderhub olenderhub changed the title Fix query param redirects during active transitions [BUGFIX] Fix query param redirects during active transitions May 18, 2026
@NullVoxPopuli
Copy link
Copy Markdown
Contributor

should #21412 be looked at first? does order matter?

@olenderhub
Copy link
Copy Markdown
Contributor Author

@NullVoxPopuli It seems to me that this doesn’t really matter for this PR, so it can be checked independently. It’s a similar issue, but not the same one, in my opinion.

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.

Redirecting a transition to same route with different query params does not work unless transition is aborted before

2 participants