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

Commit

Permalink
Don't parse paths if the binding delegate produces a prepareBinding f…
Browse files Browse the repository at this point in the history
…unction.
  • Loading branch information
justinfagnani committed Mar 19, 2014
1 parent a7e91b2 commit 51df59c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/TemplateBinding.js
Original file line number Diff line number Diff line change
Expand Up @@ -701,9 +701,14 @@
var pathString = s.slice(startIndex + 2, endIndex).trim();
tokens.push(oneTime); // ONE_TIME?
onlyOneTime = onlyOneTime && oneTime;
tokens.push(Path.get(pathString)); // PATH
var delegateFn = prepareBindingFn &&
prepareBindingFn(pathString, name, node);
// Don't try to parse the expression if there's a prepareBinding function
if (delegateFn == null) {
tokens.push(Path.get(pathString)); // PATH
} else {
tokens.push(null);
}
tokens.push(delegateFn); // DELEGATE_FN
lastIndex = endIndex + 2;
}
Expand Down

0 comments on commit 51df59c

Please sign in to comment.