diff --git a/core/block_events.js b/core/block_events.js index b57fe3ee3..1d201063f 100644 --- a/core/block_events.js +++ b/core/block_events.js @@ -73,7 +73,7 @@ Blockly.Events.BlockBase.prototype.toJson = function() { * @param {!Object} json JSON representation. */ Blockly.Events.BlockBase.prototype.fromJson = function(json) { - Blockly.Events.BlockBase.superClass_.toJson.call(this); + Blockly.Events.BlockBase.superClass_.fromJson.call(this, json); this.blockId = json['blockId']; }; diff --git a/core/ws_comment_events.js b/core/ws_comment_events.js index 70ca6d0cd..ce8f2a847 100644 --- a/core/ws_comment_events.js +++ b/core/ws_comment_events.js @@ -78,12 +78,7 @@ goog.inherits(Blockly.Events.CommentBase, Blockly.Events.Abstract); * @return {!Object} JSON representation. */ Blockly.Events.CommentBase.prototype.toJson = function() { - var json = { - 'type': this.type - }; - if (this.group) { - json['group'] = this.group; - } + var json = Blockly.Events.CommentBase.superClass_.toJson.call(this); if (this.commentId) { json['commentId'] = this.commentId; } @@ -95,8 +90,8 @@ Blockly.Events.CommentBase.prototype.toJson = function() { * @param {!Object} json JSON representation. */ Blockly.Events.CommentBase.prototype.fromJson = function(json) { + Blockly.Events.COmmentBase.superClass_.fromJson.call(this, json); this.commentId = json['commentId']; - this.group = json['group']; }; /**