Make sure we take root key-only keypaths into account when setting the model.
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -48,7 +48,7 @@ class Rivets.Binding | ... | @@ -48,7 +48,7 @@ class Rivets.Binding |
48 | 48 | ||
49 | model = current | 49 | model = current |
50 | 50 | ||
51 | if @model and @model isnt model | 51 | if @key and @model and @model isnt model |
52 | @view.adapters[@key.interface].unsubscribe @model, @key.path, @sync | 52 | @view.adapters[@key.interface].unsubscribe @model, @key.path, @sync |
53 | @view.adapters[@key.interface].subscribe model, @key.path, @sync | 53 | @view.adapters[@key.interface].subscribe model, @key.path, @sync |
54 | @model = model | 54 | @model = model | ... | ... |
-
Please register or sign in to post a comment