Procházet zdrojové kódy

LDrawLoader (packLDrawModel.js) Fix LGTM error

yomboprime před 5 roky
rodič
revize
22e42abdcc
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  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 ) {