Browse Source

catch undefined fileName

Lewy Blue 7 years ago
parent
commit
d41afdc45a
1 changed files with 5 additions and 5 deletions
  1. 5 5
      examples/js/loaders/FBXLoader.js

+ 5 - 5
examples/js/loaders/FBXLoader.js

@@ -328,19 +328,19 @@
 
 
 		var fileName;
 		var fileName;
 
 
+		var currentPath = loader.path;
+
 		var children = connections.get( textureNode.id ).children;
 		var children = connections.get( textureNode.id ).children;
 
 
 		if ( children !== undefined && children.length > 0 && images[ children[ 0 ].ID ] !== undefined ) {
 		if ( children !== undefined && children.length > 0 && images[ children[ 0 ].ID ] !== undefined ) {
 
 
 			fileName = images[ children[ 0 ].ID ];
 			fileName = images[ children[ 0 ].ID ];
 
 
-		}
-
-		var currentPath = loader.path;
+			if ( fileName.indexOf( 'blob:' ) === 0 || fileName.indexOf( 'data:' ) === 0 ) {
 
 
-		if ( fileName.indexOf( 'blob:' ) === 0 || fileName.indexOf( 'data:' ) === 0 ) {
+				loader.setPath( undefined );
 
 
-			loader.setPath( undefined );
+			}
 
 
 		}
 		}