mirror of
https://github.com/google/blockly.git
synced 2026-01-07 09:00:11 +01:00
fix: opening/closing the mutators (#6000)
This commit is contained in:
@@ -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_);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user