Prop type declaration is not working as expected for Boolean props
Version
3.2.20
Reproduction link
Steps to reproduce
- Clone repo and install dependencies
- Run
npm run build
- Run
npm run serve
- Browse to
http://localhost:5000
What is expected?
With type definition in production build, bool
prop should have value true
when passed in with no value (as documented here)
What is actually happening?
With type definition in production build, bool
prop has value "" (empty string) when passed in with no value
This issue only happens in production build: bool
prop is evaluated as empty string when passed in with no value. In development envrionment, bool
prop is properly recognized as a boolean prop.
When inspecting production build, bool
property in props has null value.
When refactoring from type declaration to runtime declaration, it works normally. In production build, bool
property in props has type of Boolean
Same issue here. Looks like a regression in production build. This broke us just recently (all our boolean props values suddenly evaluate to false).
edit: @LinusBorg I confirm, this is a regression in 3.2.20. I'd mark this as important 🙏