Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
adapt to new observe-ms api.
Browse files Browse the repository at this point in the history
  • Loading branch information
sorvell committed Dec 20, 2013
1 parent 266a8c5 commit b25604a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/instance/properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,12 @@
log.bind && console.log(LOG_BIND_PROPS, inB.localName || 'object', inPath, inA.localName, inProperty);
// capture A's value if B's value is null or undefined,
// otherwise use B's value
var v = observable.getValue();
// TODO(sorvell): need to review, can do with ObserverTransform
var v = observable.discardChanges();
if (v === null || v === undefined) {
observable.setValue(inA[inProperty]);
}
return Observer.defineProperty(inA, inProperty, observable);
return Observer.defineComputedProperty(inA, inProperty, observable);
}

// logging
Expand Down

0 comments on commit b25604a

Please sign in to comment.