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
model = current
if @key and @model and @model isnt model
@unbind true
if @model
if @model isnt model
@unbind true if @key
@model = model
@bind true
@bind true if @key
@sync()
else
@model = model
......