chore: use Boolean to filter empty (#228)
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user