소스 검색

LDrawLoader (packLDrawModel.js) Fix LGTM error

yomboprime 5 년 전
부모
커밋
22e42abdcc
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      utils/packLDrawModel.js

+ 2 - 2
utils/packLDrawModel.js

@@ -222,7 +222,7 @@ function parseObject( fileName, isRoot ) {
 
 			// Embedded object was found, add to path map
 
-			var subobjectFileName = line.substring( charIndex ).trim().replace( "\\", "/" );
+			var subobjectFileName = line.substring( charIndex ).trim().replace( /\\/g, '/' );
 
 			if ( subobjectFileName ) {
 
@@ -263,7 +263,7 @@ function parseObject( fileName, isRoot ) {
 
 			}
 
-			var subobjectFileName = line.substring( charIndex ).trim().replace( "\\", "/" );
+			var subobjectFileName = line.substring( charIndex ).trim().replace( /\\/g, '/' );
 
 			if ( subobjectFileName ) {