Browse Source

Merge pull request #13228 from looeee/FBXLoader_check_undefined_filename

FBXLoader: check for undefined fileName
Mr.doob 7 years ago
parent
commit
c97bb1f353
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 currentPath = loader.path;
+
 		var children = connections.get( textureNode.id ).children;
 
 		if ( children !== undefined && children.length > 0 && images[ children[ 0 ].ID ] !== undefined ) {
 
 			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 );
+			}
 
 		}