diff --git a/src/compiler/compile/render_dom/wrappers/RawMustacheTag.ts b/src/compiler/compile/render_dom/wrappers/RawMustacheTag.ts index 4b28815993..7810d8f099 100644 --- a/src/compiler/compile/render_dom/wrappers/RawMustacheTag.ts +++ b/src/compiler/compile/render_dom/wrappers/RawMustacheTag.ts @@ -58,7 +58,7 @@ export default class RawMustacheTagWrapper extends Tag { block.chunks.create.push(b`${html_tag} = new @HtmlTag(${is_svg ? 'true' : 'false'});`); if (this.renderer.options.hydratable) { - block.chunks.claim.push(b`${html_tag} = ${is_svg ? '@claim_svg_tag' : '@claim_html_tag'}(${_parent_nodes});`); + block.chunks.claim.push(b`${html_tag} = @claim_html_tag(${_parent_nodes}, ${is_svg ? 'true' : 'false'});`); } block.chunks.hydrate.push(b`${html_tag}.a = ${update_anchor};`); block.chunks.mount.push(b`${html_tag}.m(${init}, ${parent_node || '#target'}, ${parent_node ? null : '#anchor'});`); diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts index 5bacaf2fcf..cadc1abbaa 100644 --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -492,15 +492,8 @@ function find_comment(nodes, text, start) { return nodes.length; } -export function claim_html_tag(nodes) { - return claim_tag(nodes, false); -} - -export function claim_svg_tag(nodes) { - return claim_tag(nodes, true); -} -function claim_tag(nodes, is_svg: boolean) { +export function claim_html_tag(nodes, is_svg: boolean) { // find html opening tag const start_index = find_comment(nodes, 'HTML_TAG_START', 0); const end_index = find_comment(nodes, 'HTML_TAG_END', start_index);