mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-03 09:40:28 -04:00
ditto.
This commit is contained in:
parent
ede9bb3a54
commit
505c3f7565
1 changed files with 2 additions and 3 deletions
|
@ -702,12 +702,11 @@ class Target extends EventEmitter {
|
||||||
}
|
}
|
||||||
// Rename any local variables that were missed above because they aren't
|
// Rename any local variables that were missed above because they aren't
|
||||||
// referenced by any blocks
|
// referenced by any blocks
|
||||||
for (const id in unreferencedLocalVarIds) {
|
unreferencedLocalVarIds.forEach(varId => {
|
||||||
const varId = unreferencedLocalVarIds[id];
|
|
||||||
const name = this.variables[varId].name;
|
const name = this.variables[varId].name;
|
||||||
const type = this.variables[varId].type;
|
const type = this.variables[varId].type;
|
||||||
renameConflictingLocalVar(varId, name, type);
|
renameConflictingLocalVar(varId, name, type);
|
||||||
}
|
});
|
||||||
// Handle global var conflicts with existing global vars (e.g. a sprite is uploaded, and has
|
// Handle global var conflicts with existing global vars (e.g. a sprite is uploaded, and has
|
||||||
// blocks referencing some variable that the sprite does not own, and this
|
// blocks referencing some variable that the sprite does not own, and this
|
||||||
// variable conflicts with a global var)
|
// variable conflicts with a global var)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue