mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-04 19:07:38 +00:00
07ed959422
Since variables declared with `var` don't respect all scopes, when used in a loop it doesn't create a new variable each iteration. The initializer value is always assigned to the same variable. That makes problems when the variable is used in a callback. To work around that the variable is copied in to a IIFE. When not using `var` the iife isn't required. Ref: #7812