Component's `props` cannot correctly validate `required` on a Boolean prop
Version
3.0.7
Reproduction link
https://jsfiddle.net/cafpskt5/22/
Steps to reproduce
- Define a required boolean prop in component (e.g.
bool: { type: Boolean, required: true }
inprops
) - Use this component, but don't pass any prop to it.
What is expected?
Gives a warning [Vue warn]: Missing required prop: \"bool\""
What is actually happening?
No warning message output.
- But if you give
:bool=
a string or number, it indeed can be validated and gives a warning message ([Vue warn]: Invalid prop: type check failed for prop \"bool\". Expected Boolean, got String with value \"1\".
). - Other types (Number, String, Object) work well and have no similar bugs like this.