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 0780666 commit 8dc1f8eCopy full SHA for 8dc1f8e
src/auto/injector.js
@@ -71,7 +71,11 @@ 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
+ // TODO (gkalpak): Remove workaround when Chrome v52 is released
78
+ var fnText = Function.prototype.toString.call(fn).replace(STRIP_COMMENTS, '') + ' ',
79
args = fnText.match(ARROW_ARG) || fnText.match(FN_ARGS);
80
return args;
81
}
0 commit comments