Skip to content

Commit 1a1c636

Browse files
authored
fix: replace for-in loop with forEach in Activity._saveHelpBlocks
Replaces for-in loop over array with idiomatic forEach for safety and maintainability
1 parent 6c175b3 commit 1a1c636

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

js/activity.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,11 +1257,9 @@ class Activity {
12571257
}
12581258
}
12591259

1260-
let i = 0;
1261-
for (const name in blockHelpList) {
1262-
this.__saveHelpBlock(blockHelpList[name], i * 2000);
1263-
i += 1;
1264-
}
1260+
blockHelpList.forEach((name, i) => {
1261+
this.__saveHelpBlock(name, i * 2000);
1262+
});
12651263

12661264
this.sendAllToTrash(true, true);
12671265
};

0 commit comments

Comments
 (0)