Don't call Rivets.Binding::setModel more than once. Call ::update() on the observer instead.
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -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 | ... | ... |
-
Please register or sign in to post a comment