From 7112d008d0c1ebae37fd6a76ebfa8b0fb1092e7b Mon Sep 17 00:00:00 2001 From: Justin DuJardin Date: Sun, 7 Feb 2016 16:20:00 -0800 Subject: [PATCH] fix(IE): make shim work with instrumented code Closes #6944 --- shims_for_IE.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.