mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
[Issue-796] adding undefined check before trying to position category… (#858)
* [Issue-796] adding undefined check before trying to position category tree as it doesn't exist in the no category variant * [Issue-796] moving call to position toolbox into earlier existing if/else that already accounts for if its a category variant
This commit is contained in:
parent
a357585e25
commit
995cc0e8d6
1 changed files with 1 additions and 1 deletions
|
@ -1475,6 +1475,7 @@ Blockly.WorkspaceSvg.prototype.updateToolbox = function(tree) {
|
|||
}
|
||||
this.options.languageTree = tree;
|
||||
this.toolbox_.populate_(tree);
|
||||
this.toolbox_.position();
|
||||
} else {
|
||||
if (!this.flyout_) {
|
||||
throw 'Existing toolbox has categories. Can\'t change mode.';
|
||||
|
@ -1482,7 +1483,6 @@ Blockly.WorkspaceSvg.prototype.updateToolbox = function(tree) {
|
|||
this.options.languageTree = tree;
|
||||
this.flyout_.show(tree.childNodes);
|
||||
}
|
||||
this.toolbox_.position();
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue