Skip to content

Commit

Permalink
SVGLoader: get use.href attr with explicit namespace (#23297)
Browse files Browse the repository at this point in the history
  • Loading branch information
nkrkv authored Jan 24, 2022
1 parent a3ce4c9 commit be9d017
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/js/loaders/SVGLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@

case 'use':
style = parseStyle( node, style );
const usedNodeId = node.href.baseVal.substring( 1 );

const href = node.getAttributeNS( "http://www.w3.org/1999/xlink", "href" ) || "";
const usedNodeId = href.substring( 1 );
const usedNode = node.viewportElement.getElementById( usedNodeId );

if ( usedNode ) {
Expand Down

0 comments on commit be9d017

Please sign in to comment.