aboutsummaryrefslogtreecommitdiffstats
path: root/src/Angular.js
diff options
context:
space:
mode:
authorIgor Minar2012-03-26 12:21:42 -0700
committerIgor Minar2012-03-26 12:21:42 -0700
commit4b8d926062eb4d4483555bdbdec4656f585ab40b (patch)
tree498ed340caa4fbf7dbe98015b2716ef9a6d2232f /src/Angular.js
parent74c84501ed72782b2e46492d1ded30f51ab31176 (diff)
downloadangular.js-4b8d926062eb4d4483555bdbdec4656f585ab40b.tar.bz2
feat(assertArgFn): should support array annotated fns
Diffstat (limited to 'src/Angular.js')
-rw-r--r--src/Angular.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Angular.js b/src/Angular.js
index 371a56c0..b174a54c 100644
--- a/src/Angular.js
+++ b/src/Angular.js
@@ -959,7 +959,11 @@ function assertArg(arg, name, reason) {
return arg;
}
-function assertArgFn(arg, name) {
+function assertArgFn(arg, name, acceptArrayAnnotation) {
+ if (acceptArrayAnnotation && isArray(arg)) {
+ arg = arg[arg.length - 1];
+ }
+
assertArg(isFunction(arg), name, 'not a function, got ' +
(arg && typeof arg == 'object' ? arg.constructor.name || 'Object' : typeof arg));
return arg;