修复与 types 文件表现不一致问题

This commit is contained in:
Jonson Petard 2020-09-14 21:11:00 +08:00 committed by GitHub
parent 6dfba91da8
commit 3383783f3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,6 @@
module.exports = { module.exports = {
toBoolean(val) { toBoolean(val) {
if (typeof val === 'boolean') return val
if (val === '') return val if (val === '') return val
return val === 'true' || val == '1' return val === 'true' || val == '1'
}, },