We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76f5d66 commit 16aeb9fCopy full SHA for 16aeb9f
src/diff/children.js
@@ -116,8 +116,12 @@ export function diffChildren(
116
childVNode._flags & INSERT_VNODE ||
117
oldVNode._children === childVNode._children
118
) {
119
- // @ts-expect-error olDom should be present on a DOM node
120
- if (oldDom && !parentDom.contains(oldDom)) {
+ if (
+ 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
}
127
oldDom = insert(childVNode, oldDom, parentDom);
0 commit comments