|
@@ -28,14 +28,14 @@ export function handleAttributeBindingDirective(component, el, attrName, express
|
|
|
if (typeof value === 'string' && attrType === 'bind') {
|
|
|
el.value = value
|
|
|
} else if (attrType !== 'bind') {
|
|
|
- if (Array.isArray(value)) {
|
|
|
- // I'm purposely not using Array.includes here because it's
|
|
|
- // strict, and because of Numeric/String mis-casting, I
|
|
|
- // want the "includes" to be "fuzzy".
|
|
|
- el.checked = value.some(val => val == el.value)
|
|
|
- } else {
|
|
|
- el.checked = !! value
|
|
|
- }
|
|
|
+ if (Array.isArray(value)) {
|
|
|
+ // I'm purposely not using Array.includes here because it's
|
|
|
+ // strict, and because of Numeric/String mis-casting, I
|
|
|
+ // want the "includes" to be "fuzzy".
|
|
|
+ el.checked = value.some(val => val == el.value)
|
|
|
+ } else {
|
|
|
+ el.checked = !!value
|
|
|
+ }
|
|
|
}
|
|
|
} else if (el.tagName === 'SELECT') {
|
|
|
updateSelect(el, value)
|
|
@@ -78,7 +78,7 @@ export function handleAttributeBindingDirective(component, el, attrName, express
|
|
|
}
|
|
|
|
|
|
function setIfChanged(el, attrName, value) {
|
|
|
- if (el.getAttribute(attrName) != value){
|
|
|
+ if (el.getAttribute(attrName) != value) {
|
|
|
el.setAttribute(attrName, value)
|
|
|
}
|
|
|
}
|