mirror of
https://github.com/google/blockly.git
synced 2026-01-06 16:40:07 +01:00
Fix procedure args handling case incorrectly
This commit is contained in:
@@ -531,11 +531,14 @@ Blockly.Blocks['procedures_mutatorarg'] = {
|
||||
var workspace = sourceBlock.workspace.targetWorkspace ||
|
||||
sourceBlock.workspace;
|
||||
var blocks = workspace.getAllBlocks(false);
|
||||
var caselessName = varName.toLowerCase();
|
||||
for (var i = 0; i < blocks.length; i++) {
|
||||
if (blocks[i].id == this.getSourceBlock().id) {
|
||||
continue;
|
||||
}
|
||||
if (blocks[i].getFieldValue('NAME') == varName) {
|
||||
// Other blocks values may not be set yet when this is loaded.
|
||||
var otherVar = blocks[i].getFieldValue('NAME');
|
||||
if (otherVar && otherVar.toLowerCase() == caselessName) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user