From e908519fc321829d6e43a1a40a791ce62e2fbc8c Mon Sep 17 00:00:00 2001 From: James Date: Mon, 26 Jun 2017 23:32:38 -0700 Subject: [PATCH] stringToPath: avoid shadowing variable (#3226) - remove the shadowing done using `string` variable declared in upper scope --- .internal/stringToPath.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.internal/stringToPath.js b/.internal/stringToPath.js index b34b5ecb7..6de05e8a2 100644 --- a/.internal/stringToPath.js +++ b/.internal/stringToPath.js @@ -28,10 +28,10 @@ const stringToPath = memoizeCapped((string) => { if (reLeadingDot.test(string)) { result.push('') } - string.replace(rePropName, (match, expression, quote, string) => { + string.replace(rePropName, (match, expression, quote, subString) => { let key = match if (quote) { - key = string.replace(reEscapeChar, '$1') + key = subString.replace(reEscapeChar, '$1') } else if (expression) { key = expression.trim()