From f01272c45236410237e2b89e91735e40d005005c Mon Sep 17 00:00:00 2001 From: N <34268416+ziloen@users.noreply.github.com> Date: Thu, 3 Apr 2025 13:51:21 +0800 Subject: [PATCH 1/2] fix type --- src/clone-node.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clone-node.ts b/src/clone-node.ts index 5dfcd117..4dff6d3d 100644 --- a/src/clone-node.ts +++ b/src/clone-node.ts @@ -72,7 +72,7 @@ async function cloneSingleNode( const isSlotElement = (node: HTMLElement): node is HTMLSlotElement => node.tagName != null && node.tagName.toUpperCase() === 'SLOT' -const isSVGElement = (node: HTMLElement): node is HTMLSlotElement => +const isSVGElement = (node: HTMLElement): node is SVGElement => node.tagName != null && node.tagName.toUpperCase() === 'SVG' async function cloneChildren( From d73456c3f7dedae98ed5c596110703e7d937fdad Mon Sep 17 00:00:00 2001 From: N <34268416+ziloen@users.noreply.github.com> Date: Thu, 3 Apr 2025 14:37:03 +0800 Subject: [PATCH 2/2] Update clone-node.ts --- src/clone-node.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clone-node.ts b/src/clone-node.ts index 4dff6d3d..e9ebcac9 100644 --- a/src/clone-node.ts +++ b/src/clone-node.ts @@ -72,7 +72,7 @@ async function cloneSingleNode( const isSlotElement = (node: HTMLElement): node is HTMLSlotElement => node.tagName != null && node.tagName.toUpperCase() === 'SLOT' -const isSVGElement = (node: HTMLElement): node is SVGElement => +const isSVGElement = (node: Element): node is SVGElement => node.tagName != null && node.tagName.toUpperCase() === 'SVG' async function cloneChildren(