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

Undefined value in router query now become undefined string #3276

Closed
lephuongbg opened this issue Aug 6, 2020 · 2 comments
Closed

Undefined value in router query now become undefined string #3276

lephuongbg opened this issue Aug 6, 2020 · 2 comments

Comments

@lephuongbg
Copy link

Version

3.4.0

Reproduction link

https://jsfiddle.net/herophuong/97bq4vmh/

Steps to reproduce

  1. Call $router.push({path: '/', query: {q: undefined}})

What is expected?

URL should be /

What is actually happening?

URL is now /?q=undefined


Possibly due to fixing this issue: #2131

@posva posva closed this as completed in b952573 Aug 6, 2020
@pfdgithub
Copy link

pfdgithub commented Aug 6, 2020

This problem is introduced from 3.0.3
https://github.com/vuejs/vue-router/releases/tag/v3.0.3

undefined should be ignored

@posva
Copy link
Member

posva commented Aug 6, 2020

FYI this has been fixed and released. Undefined query Params are removed from the string representation

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

No branches or pull requests

3 participants