Perform iterator clearing after the build. Remove the iterator binding declarati…
…on from the node to prevent stack overflow.
Showing
1 changed file
with
4 additions
and
2 deletions
... | @@ -132,8 +132,6 @@ class Rivets.View | ... | @@ -132,8 +132,6 @@ class Rivets.View |
132 | iterator = [attribute] | 132 | iterator = [attribute] |
133 | 133 | ||
134 | for attribute in iterator or node.attributes | 134 | for attribute in iterator or node.attributes |
135 | iterator = null | ||
136 | |||
137 | if bindingRegExp.test attribute.name | 135 | if bindingRegExp.test attribute.name |
138 | options = {} | 136 | options = {} |
139 | 137 | ||
... | @@ -164,6 +162,10 @@ class Rivets.View | ... | @@ -164,6 +162,10 @@ class Rivets.View |
164 | 162 | ||
165 | @bindings.push binding | 163 | @bindings.push binding |
166 | 164 | ||
165 | if iterator | ||
166 | node.removeAttribute(a.name) for a in iterator | ||
167 | iterator = null | ||
168 | |||
167 | for el in @els | 169 | for el in @els |
168 | parseNode el | 170 | parseNode el |
169 | parseNode node for node in el.getElementsByTagName '*' | 171 | parseNode node for node in el.getElementsByTagName '*' | ... | ... |
-
Please register or sign in to post a comment