浏览代码

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

Dave Buchhofer 3 年之前
父节点
当前提交
24c92e806e
共有 1 个文件被更改,包括 1 次插入2 次删除
  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 += '/';