Skip to content

Commit

Permalink
golf
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinhagemeister authored and JoviDeCroock committed Mar 12, 2023
1 parent 11addc8 commit d128bf4
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/diff/children.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,13 +325,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 d128bf4

Please sign in to comment.