Skip to content

Commit

Permalink
optimize undefined setting
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Mar 23, 2024
1 parent 27f9a1c commit 1c83404
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/diff/index.js
Expand Up @@ -579,7 +579,6 @@ export function unmount(vnode, parentVNode, skipRemove) {
}

r.base = r._parentDom = null;
vnode._component = undefined;
}

if ((r = vnode._children)) {
Expand All @@ -588,7 +587,7 @@ export function unmount(vnode, parentVNode, skipRemove) {
unmount(
r[i],
parentVNode,
skipRemove || typeof vnode.type !== 'function'
skipRemove || typeof vnode.type != 'function'
);
}
}
Expand All @@ -600,7 +599,7 @@ export function unmount(vnode, parentVNode, skipRemove) {

// Must be set to `undefined` to properly clean up `_nextDom`
// for which `null` is a valid value. See comment in `create-element.js`
vnode._parent = vnode._dom = vnode._nextDom = undefined;
vnode._component = vnode._parent = vnode._dom = vnode._nextDom = undefined;
}

/** The `.render()` method for a PFC backing instance. */
Expand Down

0 comments on commit 1c83404

Please sign in to comment.