mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Marko v3: Don't render attribute value if it is an empty string
This commit is contained in:
parent
0e9d9652a3
commit
1ed8881b4d
@ -180,8 +180,8 @@ class HtmlAttribute extends Node {
|
||||
|
||||
if (this.isLiteralValue()) {
|
||||
var literalValue = value.value;
|
||||
if (typeof literalValue === 'boolean') {
|
||||
if (literalValue === true) {
|
||||
if (typeof literalValue === 'boolean' || literalValue === '') {
|
||||
if (literalValue === true || literalValue === '') {
|
||||
codegen.addWriteLiteral(' ' + name);
|
||||
}
|
||||
} else if (literalValue != null) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user