Skip to content
Snippets Groups Projects
Commit f3a2d533 authored by Karishma Chadha's avatar Karishma Chadha
Browse files

Fix rename variable bug by always passing additionalVars to the scratch-blocks...

Fix rename variable bug by always passing additionalVars to the scratch-blocks prompt callback. Let scratch-blocks decide whether or not to use the additional vars based on whether the variable is local or global.
parent 4fc8a0d1
No related branches found
No related tags found
No related merge requests found
......@@ -366,9 +366,10 @@ class Blocks extends React.Component {
this.ScratchBlocks.refreshStatusButtons(this.workspace);
}
handlePromptCallback (input, optionSelection) {
this.state.prompt.callback(input, optionSelection,
(optionSelection === 'local') ? [] :
this.props.vm.runtime.getAllVarNamesOfType(this.state.prompt.varType));
this.state.prompt.callback(
input,
this.props.vm.runtime.getAllVarNamesOfType(this.state.prompt.varType),
optionSelection);
this.handlePromptClose();
}
handlePromptClose () {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment