Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/engine/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ class Blocks {
getAllVariableAndListReferences (optBlocks, optIncludeBroadcast) {
const blocks = optBlocks ? optBlocks : this._blocks;
const allReferences = Object.create(null);
for (const blockId in blocks) {
for (const blockId of Object.keys(blocks)) {
let varOrListField = null;
let varType = null;
if (blocks[blockId].fields.VARIABLE) {
Expand Down
3 changes: 1 addition & 2 deletions src/engine/target.js
Original file line number Diff line number Diff line change
Expand Up @@ -747,8 +747,7 @@ class Target extends EventEmitter {
}
// Rename any local variables that were missed above because they aren't
// referenced by any blocks
for (const id in unreferencedLocalVarIds) {
const varId = unreferencedLocalVarIds[id];
for (const varId of unreferencedLocalVarIds) {
const name = this.variables[varId].name;
const type = this.variables[varId].type;
renameConflictingLocalVar(varId, name, type);
Expand Down