stringToPath: avoid shadowing variable (#3226)

- remove the shadowing done using `string` variable declared in upper scope
This commit is contained in:
James
2017-06-26 23:32:38 -07:00
committed by John-David Dalton
parent 61acdd0c29
commit e908519fc3

View File

@@ -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()