Skip to content
Permalink
Browse files

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

Closes: #13871
  • Loading branch information
lgalfaso authored and gkalpak committed Jan 28, 2016
1 parent 96d62cc commit 0b7fff303f46202bbae1ff3ca9d0e5fa76e0fc9a
Showing with 8 additions and 0 deletions.
  1. +1 −0 src/ng/parse.js
  2. +7 −0 test/ng/parseSpec.js
@@ -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();
}));
});
});

0 comments on commit 0b7fff3

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