Skip to content

Commit

Permalink
fix: don't show scope options when renaming a variable from the varia…
Browse files Browse the repository at this point in the history
…ble getter context menu (#139)
  • Loading branch information
gonfunko authored Aug 23, 2024
1 parent 7a85937 commit 375e56d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/blocks/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import * as Blockly from "blockly/core";
import { Categories } from "../categories.js";
import * as Constants from "../constants.js";
import * as scratchBlocksUtils from "../scratch_blocks_utils.js";
import { renameVariable } from "../variables.js";

Blockly.Blocks["data_variable"] = {
/**
Expand Down Expand Up @@ -670,7 +671,7 @@ const RENAME_OPTION_CALLBACK_FACTORY = function (block, fieldName) {
return function () {
var workspace = block.workspace;
var variable = block.getField(fieldName).getVariable();
Blockly.Variables.renameVariable(workspace, variable);
renameVariable(workspace, variable);
};
};

Expand Down

0 comments on commit 375e56d

Please # to comment.