fix($parse): Copy inputs for expressions with expensive checks

Closes: #13871
This commit is contained in:
Lucas Mirelmann
2016-01-28 15:25:45 +01:00
committed by Georgios Kalpakas
parent 96d62cc0fc
commit 0b7fff303f
2 changed files with 8 additions and 0 deletions
+1
View File
@@ -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;
+7
View File
@@ -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();
}));
});
});