Skip to content

Commit

Permalink
Don’t hide insertion marker if it’s already gone
Browse files Browse the repository at this point in the history
Fixes #2338.

I also looked at having workspace.clear delete any insertion marker, but there doesn’t appear to be a public API for this.  Shouldn’t matter, this should be sufficient.
  • Loading branch information
NeilFraser committed Jun 16, 2021
1 parent 9fa6b03 commit 36d2534
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/insertion_marker_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,10 @@ Blockly.InsertionMarkerManager.prototype.hideInsertionMarker_ = function() {
}

this.markerConnection_ = null;
imBlock.getSvgRoot().setAttribute('visibility', 'hidden');
var svg = imBlock.getSvgRoot();
if (svg) {
svg.setAttribute('visibility', 'hidden');
}
};

/**
Expand Down

0 comments on commit 36d2534

Please sign in to comment.