File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -596,7 +596,7 @@ const CUSTOM_CONTEXT_MENU_GET_LIST_MIXIN = {
596
596
if ( this . isCollapsed ( ) ) {
597
597
return ;
598
598
}
599
- var currentVarName = this . getField ( fieldName ) . text_ ;
599
+ var currentVarName = this . getField ( fieldName ) . getVariable ( ) . getName ( ) ;
600
600
if ( ! this . isInFlyout ) {
601
601
var variablesList = this . workspace . getVariablesOfType (
602
602
Constants . LIST_VARIABLE_TYPE
@@ -683,8 +683,7 @@ const RENAME_OPTION_CALLBACK_FACTORY = function (block, fieldName) {
683
683
*/
684
684
const DELETE_OPTION_CALLBACK_FACTORY = function ( block , fieldName ) {
685
685
return function ( ) {
686
- var workspace = block . workspace ;
687
- var variable = block . getField ( fieldName ) . getVariable ( ) ;
688
- workspace . deleteVariableById ( variable . getId ( ) ) ;
686
+ const variable = block . getField ( fieldName ) . getVariable ( ) ;
687
+ Blockly . Variables . deleteVariable ( variable . getWorkspace ( ) , variable , block ) ;
689
688
} ;
690
689
} ;
You can’t perform that action at this time.
0 commit comments