For example:
const arr = ["hello", "world"]
for (var i in arr) {
console.log(arr[i]);
if (i == 0) arr.splice(i, 1);
}
This should only print "hello", however, we print "hello" and "undefined".
This affects the game notification system of classic and current Cookie Clicker, which checks if the notification has expired in a for/in loop and splices the notification out of the array if it has. If this was a notification in the middle of the array, it will subsequently throw when it reaches the undefined value, which is unexpected.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too