Skip to content

Commit

Permalink
fix: use href
Browse files Browse the repository at this point in the history
  • Loading branch information
qq15725 committed Dec 30, 2024
1 parent c26d5e6 commit 7f3642f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/svg-dom/parseNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ export function parseNode(
break
case 'use': {
_style = parseStyle(node, _style, stylesheets)
const href = node.getAttributeNS('http://www.w3.org/1999/xlink', 'href') || ''
const href = node.getAttributeNS('http://www.w3.org/1999/xlink', 'href')
|| node.getAttribute('href')
|| ''
const usedNodeId = href.substring(1)
const usedNode = (node.viewportElement as any)?.getElementById(usedNodeId)
if (usedNode) {
Expand Down

0 comments on commit 7f3642f

Please sign in to comment.