945ec9da by Michael Richards

Only perform the initial bind for each-* bindings once. Unbinding does not resto…

…re the initial node or remove the marker so el.parentNode is going to be null the second time around. [Closes #165]
1 parent 846ef080
...@@ -370,6 +370,7 @@ Rivets.binders = ...@@ -370,6 +370,7 @@ Rivets.binders =
370 block: true 370 block: true
371 371
372 bind: (el) -> 372 bind: (el) ->
373 unless @marker?
373 attr = ['data', @view.config.prefix, @type].join('-').replace '--', '-' 374 attr = ['data', @view.config.prefix, @type].join('-').replace '--', '-'
374 @marker = document.createComment " rivets: #{@type} " 375 @marker = document.createComment " rivets: #{@type} "
375 @iterated = [] 376 @iterated = []
......