Skip to content

Commit

Permalink
fix: Quote Msg prop name to survive compile (google#5703)
Browse files Browse the repository at this point in the history
  • Loading branch information
NeilFraser authored Nov 10, 2021
1 parent d11cc04 commit 1fcae95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions blocks/variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ Blockly.Constants.Variables.CUSTOM_CONTEXT_MENU_VARIABLE_GETTER_SETTER_MIXIN = {
} else {
if (this.type === 'variables_get' || this.type === 'variables_get_reporter') {
const renameOption = {
text: Blockly.Msg.RENAME_VARIABLE,
text: Blockly.Msg['RENAME_VARIABLE'],
enabled: true,
callback: Blockly.Constants.Variables.RENAME_OPTION_CALLBACK_FACTORY(this),
};
const name = this.getField('VAR').getText();
const deleteOption = {
text: Blockly.Msg.DELETE_VARIABLE.replace('%1', name),
text: Blockly.Msg['DELETE_VARIABLE'].replace('%1', name),
enabled: true,
callback: Blockly.Constants.Variables.DELETE_OPTION_CALLBACK_FACTORY(this),
};
Expand Down
4 changes: 2 additions & 2 deletions blocks/variables_dynamic.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ Blockly.Constants.VariablesDynamic.CUSTOM_CONTEXT_MENU_VARIABLE_GETTER_SETTER_MI
if (this.type === 'variables_get_dynamic' ||
this.type === 'variables_get_reporter_dynamic') {
const renameOption = {
text: Blockly.Msg.RENAME_VARIABLE,
text: Blockly.Msg['RENAME_VARIABLE'],
enabled: true,
callback: Blockly.Constants.Variables.RENAME_OPTION_CALLBACK_FACTORY(this),
};
const name = this.getField('VAR').getText();
const deleteOption = {
text: Blockly.Msg.DELETE_VARIABLE.replace('%1', name),
text: Blockly.Msg['DELETE_VARIABLE'].replace('%1', name),
enabled: true,
callback: Blockly.Constants.Variables.DELETE_OPTION_CALLBACK_FACTORY(this),
};
Expand Down

0 comments on commit 1fcae95

Please sign in to comment.