Skip to content

Commit

Permalink
fix: opening/closing the mutators (google#6000)
Browse files Browse the repository at this point in the history
  • Loading branch information
alschmiedt authored Mar 21, 2022
1 parent 85ce3b8 commit 243fc52
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/mutator.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,10 @@ class Mutator extends Icon {
if (this.block_.saveConnections) {
const thisRootBlock = this.rootBlock_;
this.block_.saveConnections(thisRootBlock);
this.sourceListener_ = function() {
this.block_.saveConnections(thisRootBlock);
this.sourceListener_ = () => {
if (this.block_) {
this.block_.saveConnections(thisRootBlock);
}
};
this.block_.workspace.addChangeListener(this.sourceListener_);
}
Expand Down

0 comments on commit 243fc52

Please sign in to comment.