diff --git a/src/clone-node.ts b/src/clone-node.ts index 500ce332..c2fd486a 100644 --- a/src/clone-node.ts +++ b/src/clone-node.ts @@ -133,11 +133,11 @@ function cloneCSSStyle(nativeNode: T, clonedNode: T) { ) { value = 'block' } - + if (name === 'd' && clonedNode.getAttribute('d')) { value = `path(${clonedNode.getAttribute('d')})` } - + targetStyle.setProperty( name, value, @@ -193,7 +193,7 @@ async function ensureSVGSymbols( const processedDefs: { [key: string]: HTMLElement } = {} for (let i = 0; i < uses.length; i++) { const use = uses[i] - const id = use.getAttribute('xlink:href') + const id = use.getAttribute('href') ?? use.getAttribute('xlink:href') if (id) { const exist = clone.querySelector(id) const definition = document.querySelector(id) as HTMLElement