548a4ea6 by Michael Richards

Only take models from the parent scope if they are not already defined on the it…

…erated scope (iterating a model on the same key as one in the parent view, for example).
1 parent 50da44d7
...@@ -403,7 +403,7 @@ Rivets.binders = ...@@ -403,7 +403,7 @@ Rivets.binders =
403 403
404 if not @iterated[index]? 404 if not @iterated[index]?
405 for key, model of @view.models 405 for key, model of @view.models
406 data[key] = model 406 data[key] ?= model
407 407
408 previous = if @iterated.length 408 previous = if @iterated.length
409 @iterated[@iterated.length - 1].els[0] 409 @iterated[@iterated.length - 1].els[0]
......