mirror of
https://github.com/google/blockly.git
synced 2026-01-09 10:00:09 +01:00
Don't output blockId if not set (e.g., toolbox category event). (#443)
This commit is contained in:
committed by
Neil Fraser
parent
91b10cae2f
commit
425513b729
@@ -303,8 +303,10 @@ Blockly.Events.Abstract = function(block) {
|
||||
Blockly.Events.Abstract.prototype.toJson = function() {
|
||||
var json = {
|
||||
'type': this.type,
|
||||
'blockId': this.blockId
|
||||
};
|
||||
if (this.blockId) {
|
||||
json['blockId'] = this.blockId;
|
||||
}
|
||||
if (this.group) {
|
||||
json['group'] = this.group;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user