mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
Small code cleanup.
This commit is contained in:
parent
7a305032d6
commit
3c53fbd2b5
1 changed files with 1 additions and 1 deletions
|
@ -307,7 +307,7 @@ Blockly.Variables.promptName = function(promptText, defaultText, callback, opt_t
|
|||
* @return {string} The validated and possibly transformed name of the variable.
|
||||
*/
|
||||
Blockly.Variables.validateName_ = function(name, opt_type) {
|
||||
if (!opt_type || !opt_type == Blockly.BROADCAST_MESSAGE_VARIABLE_TYPE) {
|
||||
if (!opt_type || opt_type != Blockly.BROADCAST_MESSAGE_VARIABLE_TYPE) {
|
||||
name = name.replace(/[\s\xa0]+/g, ' ').replace(/^ | $/g, '');
|
||||
if (name == Blockly.Msg.RENAME_VARIABLE ||
|
||||
name == Blockly.Msg.NEW_VARIABLE) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue