Skip to content

Commit 559cef5

Browse files
committed
cleanup old usage of oldDom
1 parent eb63908 commit 559cef5

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/diff/children.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,6 @@ export function diffChildren(
116116
childVNode._flags & INSERT_VNODE ||
117117
oldVNode._children === childVNode._children
118118
) {
119-
if (
120-
oldDom &&
121-
typeof childVNode.type == 'string' &&
122-
// @ts-expect-error olDom should be present on a DOM node
123-
!parentDom.contains(oldDom)
124-
) {
125-
oldDom = getDomSibling(oldVNode);
126-
}
127119
oldDom = insert(childVNode, oldDom, parentDom);
128120
} else if (
129121
typeof childVNode.type == 'function' &&
@@ -380,6 +372,7 @@ function insert(parentVNode, oldDom, parentDom) {
380372
} else if (parentVNode._dom != oldDom) {
381373
if (
382374
oldDom &&
375+
parentVNode.type &&
383376
// @ts-expect-error olDom should be present on a DOM node
384377
!parentDom.contains(oldDom)
385378
) {

0 commit comments

Comments
 (0)