Skip to content

Commit

Permalink
Golf down bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Oct 13, 2024
1 parent 2715d3d commit 20942aa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/diff/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -508,12 +508,12 @@ function diffElementNodes(
unmount(i, oldVNode, true);
}

newVNode._children = [
// @ts-expect-error
createVNode(null, (dom.textContent = newChildren), null, null)
];
// @ts-expect-error
dom.textContent = newChildren;
const vnode = createVNode(null, newChildren, null, null);
newVNode._children = [vnode];
// @ts-expect-error
vnode._dom = dom.firstChild;
newVNode._children[0] = dom.firstChild;
}
} else {
if (oldHtml) dom.innerHTML = '';
Expand Down

0 comments on commit 20942aa

Please sign in to comment.