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;