refactor: remove null comparisons

This commit is contained in:
Evan You
2020-03-18 18:14:51 -04:00
parent 811f28a7d1
commit ba9a91c48c
18 changed files with 104 additions and 119 deletions

View File

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