refactor($parse): make use of local variable instead of refetching property

This commit is contained in:
Jason Bedard
2017-02-04 20:47:39 -08:00
parent b0f6afcdac
commit f1d0f03863
+2 -3
View File
@@ -1942,9 +1942,8 @@ function $ParseProvider() {
// Propagate $$watchDelegates other then inputsWatchDelegate
useInputs = !parsedExpression.inputs;
if (parsedExpression.$$watchDelegate &&
parsedExpression.$$watchDelegate !== inputsWatchDelegate) {
fn.$$watchDelegate = parsedExpression.$$watchDelegate;
if (watchDelegate && watchDelegate !== inputsWatchDelegate) {
fn.$$watchDelegate = watchDelegate;
fn.inputs = parsedExpression.inputs;
} else if (!interceptorFn.$stateful) {
// If there is an interceptor, but no watchDelegate then treat the interceptor like