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

Commit 51df59c

Browse files
committed
Don't parse paths if the binding delegate produces a prepareBinding function.
1 parent a7e91b2 commit 51df59c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/TemplateBinding.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -701,9 +701,14 @@
701701
var pathString = s.slice(startIndex + 2, endIndex).trim();
702702
tokens.push(oneTime); // ONE_TIME?
703703
onlyOneTime = onlyOneTime && oneTime;
704-
tokens.push(Path.get(pathString)); // PATH
705704
var delegateFn = prepareBindingFn &&
706705
prepareBindingFn(pathString, name, node);
706+
// Don't try to parse the expression if there's a prepareBinding function
707+
if (delegateFn == null) {
708+
tokens.push(Path.get(pathString)); // PATH
709+
} else {
710+
tokens.push(null);
711+
}
707712
tokens.push(delegateFn); // DELEGATE_FN
708713
lastIndex = endIndex + 2;
709714
}

0 commit comments

Comments
 (0)