Explorar o código

SVGLoader: get use.href attr with explicit namespace (#23297)

Victor Nakoryakov %!s(int64=3) %!d(string=hai) anos
pai
achega
be9d017eca
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      examples/js/loaders/SVGLoader.js

+ 3 - 1
examples/js/loaders/SVGLoader.js

@@ -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 ) {