@@ -1906,13 +1906,14 @@ function $ParseProvider() {
1906
1906
function addInterceptor ( parsedExpression , interceptorFn ) {
1907
1907
if ( ! interceptorFn ) return parsedExpression ;
1908
1908
var watchDelegate = parsedExpression . $$watchDelegate ;
1909
+ var useInputs = false ;
1909
1910
1910
1911
var regularWatch =
1911
1912
watchDelegate !== oneTimeLiteralWatchDelegate &&
1912
1913
watchDelegate !== oneTimeWatchDelegate ;
1913
1914
1914
1915
var fn = regularWatch ? function regularInterceptedExpression ( scope , locals , assign , inputs ) {
1915
- var value = parsedExpression ( scope , locals , assign , inputs ) ;
1916
+ var value = useInputs && inputs ? inputs [ 0 ] : parsedExpression ( scope , locals , assign , inputs ) ;
1916
1917
return interceptorFn ( value , scope , locals ) ;
1917
1918
} : function oneTimeInterceptedExpression ( scope , locals , assign , inputs ) {
1918
1919
var value = parsedExpression ( scope , locals , assign , inputs ) ;
@@ -1930,6 +1931,7 @@ function $ParseProvider() {
1930
1931
// If there is an interceptor, but no watchDelegate then treat the interceptor like
1931
1932
// we treat filters - it is assumed to be a pure function unless flagged with $stateful
1932
1933
fn . $$watchDelegate = inputsWatchDelegate ;
1934
+ useInputs = ! parsedExpression . inputs ;
1933
1935
fn . inputs = parsedExpression . inputs ? parsedExpression . inputs : [ parsedExpression ] ;
1934
1936
}
1935
1937
0 commit comments