validateType({type: t}, null) returns false, indicating that it does not pass prop validation.
To Reproduce
Steps to reproduce the behavior:
Invoke validateType({type: Object}, null)
It will return false instead of true
Expected behavior
validateType({type: t}, null) should return true for all type constructors, in order to match Vue's prop type validation. This is specified in the documentation for both Vue 2 ("null and undefined values will pass any type validation") and Vue 3 ("(null and undefined values will allow any type)").
It is of course good to reject these for {type: t, required: true}.
Describe the bug
validateType({type: t}, null)
returns false, indicating that it does not pass prop validation.To Reproduce Steps to reproduce the behavior:
validateType({type: Object}, null)
Expected behavior
validateType({type: t}, null)
should return true for all type constructors, in order to match Vue's prop type validation. This is specified in the documentation for both Vue 2 ("null
andundefined
values will pass any type validation") and Vue 3 ("(null
andundefined
values will allow any type)").It is of course good to reject these for
{type: t, required: true}
.Library version 5.0.2
Vue.js version Not involved in this code path.