We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc16340 commit a17578aCopy full SHA for a17578a
src/ng/parse.js
@@ -723,16 +723,18 @@ Parser.prototype = {
723
this.consume(')');
724
725
var expressionText = this.text;
726
- var args = []; // we can safely reuse the array
+ // we can safely reuse the array across invocations
727
+ var args = argsFn.length ? [] : null;
728
729
return function(scope, locals) {
730
var context = contextGetter ? contextGetter(scope, locals) : scope;
731
var fn = fnGetter(scope, locals, context) || noop;
732
-
733
- var i = argsFn.length;
734
- while (i--) {
735
- args[i] = argsFn[i](scope, locals);
+ if (args) {
+ var i = argsFn.length;
+ while (i--) {
736
+ args[i] = argsFn[i](scope, locals);
737
+ }
738
}
739
740
ensureSafeObject(context, expressionText);
0 commit comments