Forráskód Böngészése

Remove overlooked slot | 0 defensive checks.

manthrax 8 éve
szülő
commit
9b12fad68d

+ 1 - 1
editor/js/commands/SetMaterialColorCommand.js

@@ -20,7 +20,7 @@ var SetMaterialColorCommand = function ( object, attributeName, newValue, slot )
 
 	this.object = object;
 	this.attributeName = attributeName;
-	this.slot = slot | 0;
+	this.slot = slot;
 
 	var material = this.editor.getObjectMaterial( this.object, this.slot );
 

+ 1 - 1
editor/js/commands/SetMaterialCommand.js

@@ -19,7 +19,7 @@ var SetMaterialCommand = function ( object, newMaterial , slot) {
 
 	this.object = object;
 
-	this.slot = slot | 0;
+	this.slot = slot;
 
 	var material = this.editor.getObjectMaterial( this.object, this.slot );