浏览代码

Remove overlooked slot | 0 defensive checks.

manthrax 8 年之前
父节点
当前提交
9b12fad68d
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      editor/js/commands/SetMaterialColorCommand.js
  2. 1 1
      editor/js/commands/SetMaterialCommand.js

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

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