fix($parse): Copy inputs for expressions with expensive checks
Closes: #13871
This commit is contained in:
committed by
Georgios Kalpakas
parent
96d62cc0fc
commit
0b7fff303f
@@ -1797,6 +1797,7 @@ function $ParseProvider() {
|
||||
for (var i = 0; fn.inputs && i < fn.inputs.length; ++i) {
|
||||
fn.inputs[i] = expensiveChecksInterceptor(fn.inputs[i]);
|
||||
}
|
||||
expensiveCheckFn.inputs = fn.inputs;
|
||||
|
||||
return expensiveCheckFn;
|
||||
|
||||
|
||||
@@ -2429,6 +2429,13 @@ describe('parser', function() {
|
||||
expect($parse.$$runningExpensiveChecks()).toEqual(false);
|
||||
});
|
||||
});
|
||||
|
||||
it('should handle `inputs` when running with expensive checks', inject(function($parse) {
|
||||
expect(function() {
|
||||
scope.$watch($parse('a + b', null, true), noop);
|
||||
scope.$digest();
|
||||
}).not.toThrow();
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user