Explorar o código

GLTFLoader: Clean up (#23633)

Don McCurdy %!s(int64=3) %!d(string=hai) anos
pai
achega
5957f0b1ce
Modificáronse 1 ficheiros con 1 adicións e 9 borrados
  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() );
 
 		}