From 0a9d7c3c79103c3e8f2bd2a9a3e7b8a2d3fa7881 Mon Sep 17 00:00:00 2001 From: kozbial Date: Tue, 3 Aug 2021 15:37:53 -0700 Subject: [PATCH] Migrate core/events/events_abstract.js to ES6 const/let --- core/events/events_abstract.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/events/events_abstract.js b/core/events/events_abstract.js index 719f6d937..67287121d 100644 --- a/core/events/events_abstract.js +++ b/core/events/events_abstract.js @@ -62,7 +62,7 @@ Blockly.Events.Abstract.prototype.isUiEvent = false; * @return {!Object} JSON representation. */ Blockly.Events.Abstract.prototype.toJson = function() { - var json = { + const json = { 'type': this.type }; if (this.group) { @@ -103,8 +103,9 @@ Blockly.Events.Abstract.prototype.run = function(_forward) { * @protected */ Blockly.Events.Abstract.prototype.getEventWorkspace_ = function() { + let workspace; if (this.workspaceId) { - var workspace = Blockly.Workspace.getById(this.workspaceId); + workspace = Blockly.Workspace.getById(this.workspaceId); } if (!workspace) { throw Error('Workspace is null. Event must have been generated from real' +