Bladeren bron

remove unecessary change

Hugo Di Francesco 5 jaren geleden
bovenliggende
commit
6bac86f58c
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  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 {