cae03114 by Michael Richards

Fix @setModel logic so that @sync is called even on root-only keypaths.

1 parent 428746bd
...@@ -48,10 +48,11 @@ class Rivets.Binding ...@@ -48,10 +48,11 @@ class Rivets.Binding
48 48
49 model = current 49 model = current
50 50
51 if @key and @model and @model isnt model 51 if @model
52 @unbind true 52 if @model isnt model
53 @unbind true if @key
53 @model = model 54 @model = model
54 @bind true 55 @bind true if @key
55 @sync() 56 @sync()
56 else 57 else
57 @model = model 58 @model = model
......