Skip to content

Commit 1d4ea8e

Browse files
committed
make boolean attributes html5 spec compatible #2169
1 parent 1fb8d5c commit 1d4ea8e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/directives/public/bind.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ export default {
132132
}
133133
setClass(el, value)
134134
} else if (xlinkRE.test(attr)) {
135-
el.setAttributeNS(xlinkNS, attr, value)
135+
el.setAttributeNS(xlinkNS, attr, value === true ? '' : value)
136136
} else {
137-
el.setAttribute(attr, value)
137+
el.setAttribute(attr, value === true ? '' : value)
138138
}
139139
} else {
140140
el.removeAttribute(attr)

0 commit comments

Comments
 (0)