Remove unnecessary conditionals.

This commit is contained in:
Rachel Fenichel
2018-03-23 12:29:15 -07:00
parent d8202f8cae
commit 5839620a43
2 changed files with 2 additions and 6 deletions

View File

@@ -53,9 +53,7 @@ goog.inherits(Blockly.Events.BlockBase, Blockly.Events.Abstract);
*/
Blockly.Events.BlockBase.prototype.toJson = function() {
var json = Blockly.Events.BlockBase.superClass_.toJson.call(this);
if (this.blockId) {
json['blockId'] = this.blockId;
}
json['blockId'] = this.blockId;
return json;
};

View File

@@ -54,9 +54,7 @@ goog.inherits(Blockly.Events.VarBase, Blockly.Events.Abstract);
*/
Blockly.Events.VarBase.prototype.toJson = function() {
var json = Blockly.Events.VarBase.superClass_.toJson.call(this);
if (this.varId) {
json['varId'] = this.varId;
}
json['varId'] = this.varId;
return json;
};