6b9aca0a by Michael Richards

Don't call Rivets.Binding::setModel more than once. Call ::update() on the observer instead.

1 parent 5d649eee
...@@ -125,7 +125,7 @@ class Rivets.Binding ...@@ -125,7 +125,7 @@ class Rivets.Binding
125 # Updates the binding's model from what is currently set on the view. Unbinds 125 # Updates the binding's model from what is currently set on the view. Unbinds
126 # the old model first and then re-binds with the new model. 126 # the old model first and then re-binds with the new model.
127 update: (models = {}) => 127 update: (models = {}) =>
128 @setModel() if models[@rootKey.path] 128 @observer.update() if models[@rootKey.path]
129 @binder.update?.call @, models 129 @binder.update?.call @, models
130 130
131 # Rivets.ComponentBinding 131 # Rivets.ComponentBinding
......