2
0
Эх сурвалжийг харах

Merge pull request #19039 from kaisalmen/OBJLoader2Parser_debug_correction

Fix materialIndexLine debug printing in OBJLoader2Parser
Michael Herzog 5 жил өмнө
parent
commit
e43db781a3

+ 6 - 1
examples/jsm/loaders/obj2/OBJLoader2Parser.js

@@ -1012,7 +1012,12 @@ OBJLoader2Parser.prototype = {
 
 			if ( this.logging.enabled && this.logging.debug ) {
 
-				let materialIndexLine = ( selectedMaterialIndex === undefined || selectedMaterialIndex === null ) ? '' : '\n\t\tmaterialIndex: ' + selectedMaterialIndex;
+				let materialIndexLine = '';
+				if ( selectedMaterialIndex ) {
+
+					materialIndexLine = '\n\t\tmaterialIndex: ' + selectedMaterialIndex;
+
+				}
 				let createdReport = '\tOutput Object no.: ' + this.outputObjectCount +
 					'\n\t\tgroupName: ' + meshOutputGroup.groupName +
 					'\n\t\tIndex: ' + meshOutputGroup.index +