mirror of
https://github.com/google/blockly.git
synced 2026-01-09 10:00:09 +01:00
@@ -279,7 +279,7 @@ Blockly.Variables.createVariableButtonHandler = function(
|
||||
function(text) {
|
||||
if (text) {
|
||||
var existing =
|
||||
Blockly.Variables.nameUsedWithAnyType_(text, workspace);
|
||||
Blockly.Variables.nameUsedWithAnyType(text, workspace);
|
||||
if (existing) {
|
||||
if (existing.type == type) {
|
||||
var msg = Blockly.Msg['VARIABLE_ALREADY_EXISTS'].replace(
|
||||
@@ -424,9 +424,8 @@ Blockly.Variables.nameUsedWithOtherType_ = function(name, type, workspace) {
|
||||
* variable.
|
||||
* @return {Blockly.VariableModel} The variable with the given name,
|
||||
* or null if none was found.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Variables.nameUsedWithAnyType_ = function(name, workspace) {
|
||||
Blockly.Variables.nameUsedWithAnyType = function(name, workspace) {
|
||||
var allVariables = workspace.getVariableMap().getAllVariables();
|
||||
|
||||
name = name.toLowerCase();
|
||||
|
||||
Reference in New Issue
Block a user