Marko v3: Don't render attribute value if it is an empty string

This commit is contained in:
Patrick Steele-Idem 2016-01-11 09:59:49 -07:00
parent 0e9d9652a3
commit 1ed8881b4d
4 changed files with 2 additions and 2 deletions

View File

@ -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) {