Browse Source

GLTFLoader: Clean up (#23633)

Don McCurdy 3 years ago
parent
commit
5957f0b1ce
1 changed files with 1 additions and 9 deletions
  1. 1 9
      examples/jsm/loaders/GLTFLoader.js

+ 1 - 9
examples/jsm/loaders/GLTFLoader.js

@@ -2904,15 +2904,7 @@ class GLTFParser {
 
 		if ( this.sourceCache[ sourceIndex ] !== undefined ) {
 
-			return this.sourceCache[ sourceIndex ].then( function ( texture ) {
-
-				return texture.clone();
-
-			} ).catch( function ( error ) {
-
-				throw error;
-
-			} );
+			return this.sourceCache[ sourceIndex ].then( ( texture ) => texture.clone() );
 
 		}