No need to store a separate reference to @observer.root.
Showing
1 changed file
with
1 additions
and
2 deletions
... | @@ -32,7 +32,6 @@ class Rivets.Binding | ... | @@ -32,7 +32,6 @@ class Rivets.Binding |
32 | @bind true if @key | 32 | @bind true if @key |
33 | @sync() | 33 | @sync() |
34 | 34 | ||
35 | @rootKey = @observer.root | ||
36 | @key = @observer.key | 35 | @key = @observer.key |
37 | @model = @observer.target | 36 | @model = @observer.target |
38 | 37 | ||
... | @@ -125,7 +124,7 @@ class Rivets.Binding | ... | @@ -125,7 +124,7 @@ class Rivets.Binding |
125 | # Updates the binding's model from what is currently set on the view. Unbinds | 124 | # 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. | 125 | # the old model first and then re-binds with the new model. |
127 | update: (models = {}) => | 126 | update: (models = {}) => |
128 | @observer.update() if models[@rootKey.path] | 127 | @observer.update() if models[@observer.root.path] |
129 | @binder.update?.call @, models | 128 | @binder.update?.call @, models |
130 | 129 | ||
131 | # Rivets.ComponentBinding | 130 | # Rivets.ComponentBinding | ... | ... |
-
Please register or sign in to post a comment