Skip to content

Commit

Permalink
fix: html tag hydration: regard empty claimed_nodes array as content …
Browse files Browse the repository at this point in the history
…mismatch. fixes sveltejs#6832
  • Loading branch information
kelvinsjk committed Sep 6, 2023
1 parent effeb7a commit 9863b78
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/svelte/src/runtime/internal/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,9 @@ export function claim_html_tag(nodes, is_svg) {
n.claim_order = nodes.claim_info.total_claimed;
nodes.claim_info.total_claimed += 1;
}
if (claimed_nodes.length === 0) {
return new HtmlTagHydration(is_svg);
}
return new HtmlTagHydration(is_svg, claimed_nodes);
}

Expand Down

0 comments on commit 9863b78

Please sign in to comment.