mirror of
https://github.com/google/blockly.git
synced 2026-01-30 20:20:09 +01:00
Replace guts of buggy hasVariableField method and just ask the block for variables instead. (#667)
This commit is contained in:
@@ -935,14 +935,7 @@ FactoryUtils.hasVariableField = function(block) {
|
||||
if (!block) {
|
||||
return false;
|
||||
}
|
||||
for (var i = 0, input; input = block.inputList[i]; i++) {
|
||||
for (var j = 0, field; field = input.fieldRow[j]; j++) {
|
||||
if (field.name == 'VAR') {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return block.getVars().length > 0;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user