Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
rivets
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
8d1ea999
authored
2012-12-30 15:11:16 -0500
by
Terrance A. Snyder
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
each-* will now check for null on null array [Closes #110]
1 parent
835f5406
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
src/rivets.coffee
src/rivets.coffee
View file @
8d1ea99
...
...
@@ -339,17 +339,18 @@ Rivets.binders =
@
iterated
=
[]
for
item
in
collection
data
=
{}
data
[
n
]
=
m
for
n
,
m
of
@
view
.
models
data
[
@
args
[
0
]]
=
item
itemEl
=
el
.
cloneNode
true
if
@
iterated
.
length
>
0
previous
=
@
iterated
[
@
iterated
.
length
-
1
].
els
[
0
]
else
previous
=
@
marker
@
marker
.
parentNode
.
insertBefore
itemEl
,
previous
.
nextSibling
?
null
@
iterated
.
push
rivets
.
bind
itemEl
,
data
if
collection
for
item
in
collection
data
=
{}
data
[
n
]
=
m
for
n
,
m
of
@
view
.
models
data
[
@
args
[
0
]]
=
item
itemEl
=
el
.
cloneNode
true
if
@
iterated
.
length
>
0
previous
=
@
iterated
[
@
iterated
.
length
-
1
].
els
[
0
]
else
previous
=
@
marker
@
marker
.
parentNode
.
insertBefore
itemEl
,
previous
.
nextSibling
?
null
@
iterated
.
push
rivets
.
bind
itemEl
,
data
"class-*"
:
(
el
,
value
)
->
elClass
=
"
#{
el
.
className
}
"
...
...
Please
register
or
sign in
to post a comment