8000 handle spaces between () and argument names in functions when autowir… · recht/angular.js@1bcbb0a · GitHub
[go: up one dir, main page]

Skip to content

Commit 1bcbb0a

Browse files
author
Joakim Recht
committed
handle spaces between () and argument names in functions when autowiring in Chrome
1 parent cab5e1d commit 1bcbb0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/auto/injector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function annotate(fn) {
5353
$inject = [];
5454
fnText = fn.toString().replace(STRIP_COMMENTS, '');
5555
argDecl = fnText.match(FN_ARGS);
56-
forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg){
56+
forEach(trim(argDecl[1]).split(FN_ARG_SPLIT), function(arg){
5757
arg.replace(FN_ARG, function(all, underscore, name){
5858
$inject.push(name);
5959
});

0 commit comments

Comments
 (0)
0