Skip to content

Commit

Permalink
only check is connected for dom nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Jun 15, 2024
1 parent 4c20c23 commit 4d8357a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/diff/children.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export function diffChildren(
oldVNode._children === childVNode._children
) {
// @ts-expect-error olDom should be present on a DOM node
if (oldDom && !oldDom.isConnected) {
if (oldDom && oldDom.nodeType === 1 && !oldDom.isConnected) {
oldDom = getDomSibling(oldVNode);
}
oldDom = insert(childVNode, oldDom, parentDom);
Expand Down

0 comments on commit 4d8357a

Please sign in to comment.