chore: use Boolean to filter empty (#228)

This commit is contained in:
Cong Min 2019-10-12 22:55:35 +08:00 committed by Evan You
parent 64c7be3763
commit ec05469b1a
2 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@ function serializeElement(
const value = node.props[key]
return isOn(key) || value == null ? `` : `${key}=${JSON.stringify(value)}`
})
.filter(_ => _)
.filter(Boolean)
.join(' ')
const padding = indent ? ` `.repeat(indent).repeat(depth) : ``
return (

View File

@ -68,7 +68,7 @@ async function build(target) {
args.types ? `TYPES:true` : ``,
prodOnly ? `PROD_ONLY:true` : ``
]
.filter(_ => _)
.filter(Boolean)
.join(',')
],
{ stdio: 'inherit' }