Merge pull request #930 from greenhat616/patch-1

修复与 types 文件表现不一致问题
This commit is contained in:
binaryify 2020-09-15 09:46:59 +08:00 committed by GitHub
commit cbb1fdc152
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'
}, },