소스 검색

remove unecessary change

Hugo Di Francesco 5 년 전
부모
커밋
6bac86f58c
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/directives/bind.js

+ 2 - 2
src/directives/bind.js

@@ -69,10 +69,10 @@ export function handleAttributeBindingDirective(component, el, attrName, express
             el.setAttribute('class', arrayUnique(originalClasses.concat(newClasses)).join(' '))
         }
     } else if (isBooleanAttr(attrName)) {
-        if (!!value) {
+        // Boolean attributes have to be explicitly added and removed, not just set.
+        if (!! value) {
             el.setAttribute(attrName, '')
         } else {
-            // If a Boolean attribute has a falsy value, remove the attribute
             el.removeAttribute(attrName)
         }
     } else {