We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 253cb8d commit 1c1b1e0Copy full SHA for 1c1b1e0
src/auto/injector.js
@@ -71,7 +71,10 @@ var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
71
var $injectorMinErr = minErr('$injector');
72
73
function extractArgs(fn) {
74
- var fnText = Function.prototype.toString.call(fn).replace(STRIP_COMMENTS, ''),
+ // Support: Chrome 50-51 only
75
+ // Creating a new string by adding `' '` at the end, to hack around some bug in Chrome v50/51
76
+ // (See https://github.com/angular/angular.js/issues/14487.)
77
+ var fnText = Function.prototype.toString.call(fn).replace(STRIP_COMMENTS, '') + ' ',
78
args = fnText.match(ARROW_ARG) || fnText.match(FN_ARGS);
79
return args;
80
}
0 commit comments