From 554e64401741819ea21db70b0a03636303f60800 Mon Sep 17 00:00:00 2001 From: Neil Fraser Date: Thu, 15 Mar 2018 17:10:38 -0700 Subject: [PATCH] Don't compute (useless) location of trashcan while workspace is being built. Theoretical performance bump, fixes crash in Opera 12. --- core/workspace_svg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/workspace_svg.js b/core/workspace_svg.js index 0a2af7229..c976749d1 100644 --- a/core/workspace_svg.js +++ b/core/workspace_svg.js @@ -1009,7 +1009,7 @@ Blockly.WorkspaceSvg.prototype.createVariable = function(name, opt_type, opt_id) * Make a list of all the delete areas for this workspace. */ Blockly.WorkspaceSvg.prototype.recordDeleteAreas = function() { - if (this.trashcan) { + if (this.trashcan && this.svgGroup_.parentNode) { this.deleteAreaTrash_ = this.trashcan.getClientRect(); } else { this.deleteAreaTrash_ = null;