Refactor for ... in loops

This commit is contained in:
nickofolas
2022-01-15 18:45:03 -06:00
parent d5c3d89613
commit ab841f7530
54 changed files with 128 additions and 130 deletions
+1 -1
View File
@@ -169,7 +169,7 @@ const Engine: {
},
decrementAllCounters: function (numCycles = 1) {
for (const counterName in Engine.Counters) {
for (const counterName of Object.keys(Engine.Counters)) {
const counter = Engine.Counters[counterName];
if (counter === undefined) throw new Error("counter should not be undefined");
Engine.Counters[counterName] = counter - numCycles;