Skip to content

Commit

Permalink
golf
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinhagemeister committed Oct 17, 2022
1 parent 2d050c8 commit b844b56
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/diff/children.js
Expand Up @@ -310,13 +310,12 @@ function placeChild(
if (nextDom !== undefined) {
oldDom = nextDom;
} else {
oldDom = newDom.nextSibling;
}

// Skip over comment nodes. Will be removed right after calling diffChildren
// in diff so that the vnode tree matches the DOM tree again.
while (oldDom !== null && oldDom.nodeType === 8) {
oldDom = oldDom.nextSibling;
oldDom = newDom;
// Skip over comment nodes. Will be removed right after calling diffChildren
// in diff so that the vnode tree matches the DOM tree again.
do {
oldDom = oldDom.nextSibling;
} while (oldDom !== null && oldDom.nodeType === 8);
}

return oldDom;
Expand Down

0 comments on commit b844b56

Please sign in to comment.