chore: use Boolean to filter empty (#228)
This commit is contained in:
parent
64c7be3763
commit
ec05469b1a
@ -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 (
|
||||
|
@ -68,7 +68,7 @@ async function build(target) {
|
||||
args.types ? `TYPES:true` : ``,
|
||||
prodOnly ? `PROD_ONLY:true` : ``
|
||||
]
|
||||
.filter(_ => _)
|
||||
.filter(Boolean)
|
||||
.join(',')
|
||||
],
|
||||
{ stdio: 'inherit' }
|
||||
|
Loading…
Reference in New Issue
Block a user