refactor: adjust runtime-dom test structure + tests for dom props

This commit is contained in:
Evan You
2020-04-10 15:37:30 -04:00
parent ed235f16de
commit ab16a065a8
6 changed files with 73 additions and 9 deletions

View File

@@ -14,8 +14,10 @@ export function patchDOMProp(
parentSuspense: any,
unmountChildren: any
) {
if ((key === 'innerHTML' || key === 'textContent') && prevChildren) {
unmountChildren(prevChildren, parentComponent, parentSuspense)
if (key === 'innerHTML' || key === 'textContent') {
if (prevChildren) {
unmountChildren(prevChildren, parentComponent, parentSuspense)
}
el[key] = value == null ? '' : value
return
}