emberjs / emberjs/ember.js

Router Service transitionTo breaks with Query Params on nested transition

Open
#17,494 17 comments 10 reactions 0 assignees View on GitHub
Has Reproduction Needs Bug Verification Routing
Dominant language
TypeScript
Stars
22.6k
Forks
4.2k
Avg merge
3d 12h
Merged PRs (30d)
15

Description

Calling `transitionTo` on a service in the context of an existing transition causes an assertion error to be thrown.

Example Twiddle [here](https://ember-twiddle.com/3e2ad44eeada3e36c72ddd2f9548712e?openFiles=services.auth.js%2C)

Minimal logic from the reproduction above is: index route's `beforeModel` calls the auth service's `ensureSignedIn` method which uses the router's `transitionTo` method and includes a query param.

Calling it results in:
```
Assertion Failed: You passed the `login:security_key` query parameter during a transition into login, please update to security_key
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.