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

Multi-type prop validation [Boolean, String] cast empty string to true #4538

Closed
fliptheweb opened this issue Dec 21, 2016 · 1 comment
Closed

Comments

@fliptheweb
Copy link
Contributor

fliptheweb commented Dec 21, 2016

Vue.js version

2.0.2

Reproduction Link

https://jsfiddle.net/fliptheweb/zjr41svn/4/

Steps to reproduce

What is Expected?

An empty string '' must pass to the component like an empty string.

What is actually happening?

It's type cast type to boolean true

@fliptheweb
Copy link
Contributor Author

fliptheweb commented Dec 21, 2016

It seems that if types validation includes String and Boolean together, we should not check here for the blank line.

There is another case when we have hyphenated string that looks like a prop.

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

1 participant