From 80818aea7be0a07506b520c80a6e698696d3318c Mon Sep 17 00:00:00 2001 From: plainheart Date: Wed, 25 Aug 2021 09:47:50 +0800 Subject: [PATCH] fix(svg): SVG tag also should consider `href` attribute. --- src/tool/parseSVG.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tool/parseSVG.ts b/src/tool/parseSVG.ts index 7a071a2fb..7f52f19dc 100644 --- a/src/tool/parseSVG.ts +++ b/src/tool/parseSVG.ts @@ -479,7 +479,7 @@ class SVGParser { parseAttributes(xmlNode, img, this._defsUsePending, false, false); img.setStyle({ - image: xmlNode.getAttribute('xlink:href'), + image: xmlNode.getAttribute('xlink:href') || xmlNode.getAttribute('href'), x: +xmlNode.getAttribute('x'), y: +xmlNode.getAttribute('y'), width: +xmlNode.getAttribute('width'),