Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Router Service transitionTo breaks with Query Params on Application Route #15735

Closed
westlywright opened this issue Oct 12, 2017 · 6 comments
Closed

Comments

@westlywright
Copy link

With query parameters on the application route/controller an assert is thrown when using the new router service's transitionTo method. The assert is throw in _hydrateUnsuppliedQueryParams because the query param does not exist in the query parameters argument passed down the treen during transitonTo.

Specfically the assert was added at this commit

Since Ember twiddle is not up to date with the latest release I've created a demo app that reproduces this scenario here that can be pulled. Star the app and follow the link tree down to sub route. You'll notice that the Back To Main Narp False link-to works fine, but Take Me Home Narp True button causes the assertion. If you remove the query parameters from the application controller, everything works great!

@brandynbennett
Copy link

brandynbennett commented Oct 12, 2017

This commit might fix the issue, but it's not part of a release
1c8c6ec

@brandynbennett
Copy link

You get the following error if you attempt to transition to a route with query params without providing a value for all of the query params:

Assertion Failed: You passed the 'false' query parameter during a transition into 'myroute' please update to 'myQueryParam'

The error is coming from https://github.com/emberjs/ember.js/blob/f4bbfe27d55caa5182fcd229f09a690fe11a9ca6/packages/ember-routing/lib/system/router.js

@brandynbennett
Copy link

@rwjblue is it possible to push a 2.16.1 with 1c8c6ec in it

@brandynbennett
Copy link

Looks like #15726 includes the fix.

@brandynbennett
Copy link

more discussion here #15613

@westlywright
Copy link
Author

@brandynbennett thanks for the follow up, seems the issue is already known so I'll close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants