Make variable method public (#3840)

* Make nameUsedWithAnyType public
This commit is contained in:
alschmiedt
2020-04-20 11:25:35 -07:00
committed by GitHub
parent 7c3fbad360
commit 9513473c74

View File

@@ -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();