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).
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -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] | ... | ... |
-
Please register or sign in to post a comment