fix(runtime-dom): cast to true for boolean props
This commit is contained in:
parent
b0156b5df3
commit
59e18e5478
@ -18,5 +18,10 @@ export function patchDOMProp(
|
|||||||
// non-string values will be stringified.
|
// non-string values will be stringified.
|
||||||
el._value = value
|
el._value = value
|
||||||
}
|
}
|
||||||
el[key] = value == null ? '' : value
|
if (value === '' && typeof el[key] === 'boolean') {
|
||||||
|
// e.g. <select multiple> compiles to { multiple: '' }
|
||||||
|
el[key] = true
|
||||||
|
} else {
|
||||||
|
el[key] = value == null ? '' : value
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user