diff --git a/shims_for_IE.js b/shims_for_IE.js index 9a5c1488ac..96a9c61453 100644 --- a/shims_for_IE.js +++ b/shims_for_IE.js @@ -3,7 +3,7 @@ if (!Object.hasOwnProperty('name')) { Object.defineProperty(Function.prototype, 'name', { get: function() { - var matches = this.toString().match(/^\s*function\s*(\S*)\s*\(/); + var matches = this.toString().match(/^\s*function\s*((?![0-9])[a-zA-Z0-9_$]*)\s*\(/); var name = matches && matches.length > 1 ? matches[1] : ""; // For better performance only parse once, and then cache the // result through a new accessor for repeated access.