Skip to content

Commit

Permalink
For correctness, bind listeners must use a property's current value r…
Browse files Browse the repository at this point in the history
…ather than its passed value.
  • Loading branch information
Steven Orvell committed Nov 10, 2015
1 parent b905a37 commit aca404f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib/bind/accessors.html
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,12 @@
if (targetPath) {
this._notifyPath(this._fixPath(path, property, targetPath), value);
} else {
value = value !== undefined ? value : target[property];
// TODO(sorvell): even though we have a `value` argument, we *must*
// lookup the current value of the property. Multiple listeners and
// queued events during configuration can theoretically lead to
// divergence of the passed value from the current value, but we
// really need to track down a specific case where this happens.
value = target[property];
if (!isStructured) {
this[path] = value;
} else {
Expand Down

0 comments on commit aca404f

Please sign in to comment.