From 425513b7297da4f194a8595d1f0a4169afb79769 Mon Sep 17 00:00:00 2001 From: Andrew n marshall Date: Wed, 22 Jun 2016 13:11:19 -0700 Subject: [PATCH] Don't output blockId if not set (e.g., toolbox category event). (#443) --- core/events.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/events.js b/core/events.js index f1971478d..f78222d03 100644 --- a/core/events.js +++ b/core/events.js @@ -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; }