Quellcode durchsuchen

[gltf] - only append trailing slash if the path is not blank.

Dave Buchhofer vor 3 Jahren
Ursprung
Commit
24c92e806e
1 geänderte Dateien mit 1 neuen und 2 gelöschten Zeilen
  1. 1 2
      src/three/GLTFExtensionLoader.js

+ 1 - 2
src/three/GLTFExtensionLoader.js

@@ -40,13 +40,12 @@ export class GLTFExtensionLoader extends LoaderBase {
 
 				}
 
-
 			}
 
 			// assume any pre-registered loader has paths configured as the user desires, but if we're making
 			// a new loader, use the working path during parse to support relative uris on other hosts
 			let resourcePath = loader.resourcePath || loader.path || this.workingPath;
-			if ( ! /[\\/]$/.test( resourcePath ) ) {
+			if ( ! /[\\/]$/.test( resourcePath ) && resourcePath.length ) {
 
 				resourcePath += '/';