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

Commit

Permalink
NodeBinding.path is a Path (not string)
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelw committed Sep 4, 2013
1 parent 5cb8671 commit a482404
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/NodeBind.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,17 @@
this.bindings = {};
};

var valuePath = Path.get('value');

function NodeBinding(node, property, model, path) {
this.closed = false;
this.node = node;
this.property = property;
this.model = model;
this.path = path || '';
this.path = Path.get(path);
if ((this.model instanceof PathObserver ||
this.model instanceof CompoundPathObserver) &&
this.path === 'value') {
this.path === valuePath) {
this.observer = this.model;
this.observer.target = this;
this.observer.callback = this.valueChanged;
Expand Down

0 comments on commit a482404

Please sign in to comment.