fix(runtime-dom): remove attrs with nullish values

fix #1576
This commit is contained in:
Evan You
2020-07-14 16:25:21 -04:00
parent 00ab9e2e85
commit cb6a0915c5
2 changed files with 18 additions and 0 deletions

View File

@@ -37,6 +37,7 @@ export function patchDOMProp(
} else if (value == null && typeof el[key] === 'string') {
// e.g. <div :id="null">
el[key] = ''
el.removeAttribute(key)
} else {
// some properties perform value validation and throw
try {