From c2d1002fe5cd88b8fb86a03de7b9ed89e56964da Mon Sep 17 00:00:00 2001 From: milk-z <47883805+milk-z@users.noreply.github.com> Date: Fri, 28 Feb 2020 11:21:44 -0800 Subject: [PATCH] Don't mix formal parameters and arguments array IE11 perf is significantly degraded when mixing formal parameters and the arguments array --- es6-shim.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/es6-shim.js b/es6-shim.js index d7403d7f..b4739e65 100644 --- a/es6-shim.js +++ b/es6-shim.js @@ -1387,7 +1387,8 @@ var isBadHex = isBadHexRegex.test.bind(isBadHexRegex); var NumberShim = (function () { // this is wrapped in an IIFE because of IE 6-8's wacky scoping issues with named function expressions. - var NumberShim = function Number(value) { + var NumberShim = function Number() { + var value = arguments[0]; var primValue; if (arguments.length > 0) { primValue = Type.primitive(value) ? value : toPrimitive(value, 'number');