Skip to content

Commit

Permalink
fix: show the name of the list in the list getter block context menu (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
gonfunko authored Aug 21, 2024
1 parent ff4b115 commit eb839fc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions blocks_vertical/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ const CUSTOM_CONTEXT_MENU_GET_LIST_MIXIN = {
if (this.isCollapsed()) {
return;
}
var currentVarName = this.getField(fieldName).text_;
var currentVarName = this.getField(fieldName).getVariable().getName();
if (!this.isInFlyout) {
var variablesList = this.workspace.getVariablesOfType(
Constants.LIST_VARIABLE_TYPE
Expand Down Expand Up @@ -683,8 +683,7 @@ const RENAME_OPTION_CALLBACK_FACTORY = function (block, fieldName) {
*/
const DELETE_OPTION_CALLBACK_FACTORY = function (block, fieldName) {
return function () {
var workspace = block.workspace;
var variable = block.getField(fieldName).getVariable();
workspace.deleteVariableById(variable.getId());
const variable = block.getField(fieldName).getVariable();
Blockly.Variables.deleteVariable(variable.getWorkspace(), variable, block);
};
};

0 comments on commit eb839fc

Please # to comment.