From 0a77b654e256c623def969ba7345eead5b9054f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Wed, 14 Nov 2018 00:04:11 +0100 Subject: [PATCH] Fix String#replace bug with named groups in IE8 --- packages/core-js/modules/es.string.replace.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core-js/modules/es.string.replace.js b/packages/core-js/modules/es.string.replace.js index 5849da9df055..8392451baae7 100644 --- a/packages/core-js/modules/es.string.replace.js +++ b/packages/core-js/modules/es.string.replace.js @@ -96,7 +96,7 @@ require('../internals/fix-regexp-well-known-symbol-logic')( } return nativeReplace.call(replacement, symbols, function (match, ch) { var capture; - switch (ch[0]) { + switch (ch.charAt(0)) { case '$': return '$'; case '&': return matched; case '`': return str.slice(0, position);