Browse Source

Update GLTFLoader.js

gilnoycloudinary 6 years ago
parent
commit
bc73e5bd42
1 changed files with 4 additions and 3 deletions
  1. 4 3
      examples/js/loaders/GLTFLoader.js

+ 4 - 3
examples/js/loaders/GLTFLoader.js

@@ -371,7 +371,8 @@ THREE.GLTFLoader = ( function () {
 
 		lightNode.name = lightDef.name || ( 'light_' + lightIndex );
 
-		return Promise.resolve( lightNode );
+		return Promise.
+		( lightNode );
 
 	};
 
@@ -1248,8 +1249,8 @@ THREE.GLTFLoader = ( function () {
 		if ( typeof url !== 'string' || url === '' ) return '';
 		
 		// Host Relative URL
-		if (/^https?:\/\//i.test(path) && /^\//.test(url)) {
-      			path = path.replace(/(^https?:\/\/[^\/]+).*/i, "$1");
+		if ( /^https?:\/\//i.test(path) && /^\//.test(url) ) {
+			path = path.replace( /(^https?:\/\/[^\/]+).*/i , '$1' );
 		}
 
 		// Absolute URL http://,https://,//