Replace guts of buggy hasVariableField method and just ask the block for variables instead. (#667)

This commit is contained in:
picklesrus
2016-10-04 16:18:29 -07:00
committed by GitHub
parent 4126972b55
commit 58774811b3

View File

@@ -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;
};
/**