Shopify/batman — Issue #317: Duplicate entries appear (sometimes) during data-foreach loops
Author: johnthethird
Created: 2012-01-25 20:21:17+00:00
State: open

During testing on IE8 in a VM, we observed that sometimes nodes would get duplicated during the foreach loops. IE would also throw Invalid Attribute errors when doing the nextSibling calls during rendering. After much investigation, we were able to reproduce the behavior on any browser simply by setting the `Batman.DOM.IteratorBinding#deferEvery` property to something ridiculously small, like 1. This would not cause the behavior in every loop, but in would appear consistently in the 3-levels-deep nested loops.

Setting it to a higher value like 250 eliminated the problems we were seeing on IE. So it seems that until the underlying problem is addressed, bumping up the deferEvery value from the default 50 would be a good idea. Something like this would work

```coffeescript
MyApp = class MyApp extends Batman.App
Batman.Renderer.prototype.deferEvery = 250
...
```