Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
rivets
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
484127d0
authored
2013-09-10 15:33:07 -0700
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Remove excess observer calls in Binding::update.
1 parent
08563352
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
6 deletions
src/bindings.coffee
src/bindings.coffee
View file @
484127d
...
...
@@ -149,12 +149,7 @@ class Rivets.Binding
# Updates the binding's model from what is currently set on the view. Unbinds
# the old model first and then re-binds with the new model.
update
:
(
models
=
{})
=>
if
models
[
@
rootKey
.
path
]
@
view
.
adapters
[
@
key
.
interface
].
unsubscribe
(
@
model
,
@
key
.
path
,
@
sync
)
if
@
key
@
setModel
()
@
view
.
adapters
[
@
key
.
interface
].
subscribe
(
@
model
,
@
key
.
path
,
@
sync
)
if
@
key
@
sync
()
@
setModel
()
if
models
[
@
rootKey
.
path
]
@
binder
.
update
?
.
call
@
,
models
# Rivets.ComponentBinding
...
...
Please
register
or
sign in
to post a comment