fix(runtime-test): output empty attrs without value in seralized output
This commit is contained in:
@@ -40,7 +40,11 @@ function serializeElement(
|
||||
const props = Object.keys(node.props)
|
||||
.map(key => {
|
||||
const value = node.props[key]
|
||||
return isOn(key) || value == null ? `` : `${key}=${JSON.stringify(value)}`
|
||||
return isOn(key) || value == null
|
||||
? ``
|
||||
: value === ``
|
||||
? key
|
||||
: `${key}=${JSON.stringify(value)}`
|
||||
})
|
||||
.filter(Boolean)
|
||||
.join(' ')
|
||||
|
||||
Reference in New Issue
Block a user