fc2a7409 by Adam Heath

In View.build, protect nodes from being parsed that have no attributes.

This can happen when you've loaded a text file from the server, passed
it to jquery, and the resulting list of nodes contains text nodes(the
trailing newline, for instance).
1 parent 9d7e2c23
...@@ -262,7 +262,7 @@ class Rivets.View ...@@ -262,7 +262,7 @@ class Rivets.View
262 return 262 return
263 263
264 for el in @els 264 for el in @els
265 parse el 265 parse el if el.attributes?
266 parse node for node in el.getElementsByTagName '*' when node.attributes? 266 parse node for node in el.getElementsByTagName '*' when node.attributes?
267 267
268 return 268 return
......