Skip to content
Permalink
Browse files

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

Closes: #13871
  • Loading branch information
lgalfaso committed Jan 28, 2016
1 parent 5a3504a commit 37cb9ad43619e2b14055b3105a954f4474cd933c
Showing with 8 additions and 0 deletions.
  1. +1 −0 src/ng/parse.js
  2. +7 −0 test/ng/parseSpec.js
@@ -1819,6 +1819,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;

@@ -2457,6 +2457,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();
}));
});
});

0 comments on commit 37cb9ad

Please sign in to comment.
You can’t perform that action at this time.