Skip to content

Commit

Permalink
fix: lib/dom - prevent needless dom commit ops during hydration
Browse files Browse the repository at this point in the history
  • Loading branch information
LankyMoose committed Sep 25, 2024
1 parent cf3bd9a commit 47d5beb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/lib/src/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ function commitWork(vNode: VNode) {
}

function commitDom(node: DomVNode, hostNodes: HostNode[]) {
if (renderMode.current === "hydrate") return
if (isPortal(node)) return
const host = hostNodes[hostNodes.length - 1]
if (!node.dom.isConnected || bitmapOps.isFlagSet(node, FLAG.PLACEMENT)) {
Expand Down

0 comments on commit 47d5beb

Please sign in to comment.