[Bug] Error when transitioning to a route with QPs
- Dominant language
- TypeScript
- Stars
- 22.6k
- Forks
- 4.2k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 15
Description
### 🐞 Describe the Bug
I am transitioning to a route that has a `:name` in the url and also QPs. This transition can be slow. If, while the transition is still taking place, I try to transition to the same route with different QPs, I get the following error.
```
Error: You must provide param `name` to `generate`.
at getParam (route-recognizer.js:137)
at Array.generate. (route-recognizer.js:183)
at RouteRecognizer.generate$1 [as generate] (route-recognizer.js:553)
at PrivateRouter._updateURL (router_js.js:1651)
at router_js.js:1250
at invokeCallback (rsvp.js:485)
at rsvp.js:546
at rsvp.js:14
at invokeWithOnError (backburner.js:272)
at Queue.flush (backburner.js:182)
```
### 🔬 Minimal Reproduction
TODO
### 😕 Actual Behavior
My theory is that the router is trying to update the QPs on the current route, not the future one. In the above example, if I pause where the error is thrown, I can see that `params` are the params of the current route, not the future one.
### 🤔 Expected Behavior
This doesn't raise an error.
### 🌍 Environment
- Ember: 3.25.3
- Node.js/npm: 14.15.1
- OS: macOS 11.2.3
- Browser: Chrome 91.0.4449.6
Contributor guide
Assessment
This issue has not been assessed yet.