diff --git a/packages/svelte/src/runtime/internal/dom.js b/packages/svelte/src/runtime/internal/dom.js index 18a5d5d2787b..0c3e3037b16a 100644 --- a/packages/svelte/src/runtime/internal/dom.js +++ b/packages/svelte/src/runtime/internal/dom.js @@ -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); }