66b0b378 by Mariano Benedettini Committed by Michael Richards

Add condition that only parses nodes which have an attributes property (not comment nodes).

1 parent 19d6db6b
...@@ -133,7 +133,7 @@ class Rivets.View ...@@ -133,7 +133,7 @@ class Rivets.View
133 skipNodes = [] 133 skipNodes = []
134 bindingRegExp = @bindingRegExp() 134 bindingRegExp = @bindingRegExp()
135 135
136 parseNode = (node) => 136 parse = (node) =>
137 unless node in skipNodes 137 unless node in skipNodes
138 for attribute in node.attributes 138 for attribute in node.attributes
139 if bindingRegExp.test attribute.name 139 if bindingRegExp.test attribute.name
...@@ -183,8 +183,8 @@ class Rivets.View ...@@ -183,8 +183,8 @@ class Rivets.View
183 return 183 return
184 184
185 for el in @els 185 for el in @els
186 parseNode el 186 parse el
187 parseNode node for node in el.getElementsByTagName '*' 187 parse node for node in el.getElementsByTagName '*' when node.attributes?
188 188
189 return 189 return
190 190
......