mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
stringToPath: avoid shadowing variable (#3226)
- remove the shadowing done using `string` variable declared in upper scope
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user