Browse Source

Match code style.

Don McCurdy 6 years ago
parent
commit
5e774c975b
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,8 +371,7 @@ THREE.GLTFLoader = ( function () {
 
 		lightNode.name = lightDef.name || ( 'light_' + lightIndex );
 
-		return Promise.
-		( lightNode );
+		return Promise.resolve( lightNode );
 
 	};
 
@@ -1249,8 +1248,10 @@ THREE.GLTFLoader = ( function () {
 		if ( typeof url !== 'string' || url === '' ) return '';
 		
 		// Host Relative URL
-		if ( /^https?:\/\//i.test(path) && /^\//.test(url) ) {
+		if ( /^https?:\/\//i.test( path ) && /^\//.test( url ) ) {
+
 			path = path.replace( /(^https?:\/\/[^\/]+).*/i , '$1' );
+
 		}
 
 		// Absolute URL http://,https://,//