Skip to content

Commit 9863b78

Browse files
committed
fix: html tag hydration: regard empty claimed_nodes array as content mismatch. fixes sveltejs#6832
1 parent effeb7a commit 9863b78

File tree

1 file changed

+3
-0
lines changed
  • packages/svelte/src/runtime/internal

1 file changed

+3
-0
lines changed

packages/svelte/src/runtime/internal/dom.js

+3
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,9 @@ export function claim_html_tag(nodes, is_svg) {
806806
n.claim_order = nodes.claim_info.total_claimed;
807807
nodes.claim_info.total_claimed += 1;
808808
}
809+
if (claimed_nodes.length === 0) {
810+
return new HtmlTagHydration(is_svg);
811+
}
809812
return new HtmlTagHydration(is_svg, claimed_nodes);
810813
}
811814

0 commit comments

Comments
 (0)