fix: Quote Msg prop name to survive compile (#5703)

This commit is contained in:
Neil Fraser
2021-11-10 12:45:19 -08:00
committed by GitHub
parent d11cc047a4
commit 1fcae953fc
2 changed files with 4 additions and 4 deletions

View File

@@ -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),
};

View File

@@ -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),
};