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

Add null and undefined type coercion for query params #15727

Closed
wants to merge 2 commits into from

Conversation

CvX
Copy link
Contributor

@CvX CvX commented Oct 10, 2017

Continued from PR #15613.

Fixes the problem reported in #4570 (and attempted to be fixed in #4571). This fix (originally by @raytiley) is required to make the above use case work. Without it, transitioning to a route that has multiple query params ends up with all of them in the url with the value null, i.e.

  Ember.Controller.extend({
    queryParams: ['q', 'other', 'stuff']
  });

  // in some component
  this.get('router').transitionTo('articles', {
    queryParams: { q: 'test' },
  });

  // We end up at: /articles?q=test&other=null&stuff=null
  // Instead of (after the fix): /articles?q=test

raytiley and others added 2 commits October 10, 2017 22:15
…ined into url

# Conflicts:
#	packages/ember/tests/routing/query_params_test.js
#	packages_es6/ember-routing/lib/system/route.js
@rwjblue
Copy link
Member

rwjblue commented Oct 10, 2017

Merged these changes in #15613.

@rwjblue rwjblue closed this Oct 10, 2017
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

Successfully merging this pull request may close these issues.

None yet

3 participants