mirror of
https://github.com/google/blockly.git
synced 2026-01-08 01:20:12 +01:00
Remove unnecessary conditionals.
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user