mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Fix stringToPath bug for consecutive [] (#4319)
This commit is contained in:
committed by
John-David Dalton
parent
8fdf0ed9fa
commit
488e62bd79
@@ -8,7 +8,7 @@ const rePropName = RegExp(
|
|||||||
// Or match property names within brackets.
|
// Or match property names within brackets.
|
||||||
'\\[(?:' +
|
'\\[(?:' +
|
||||||
// Match a non-string expression.
|
// Match a non-string expression.
|
||||||
'([^"\'].*)' + '|' +
|
'([^"\'][^[]*)' + '|' +
|
||||||
// Or match strings (supports escaping characters).
|
// Or match strings (supports escaping characters).
|
||||||
'(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2' +
|
'(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2' +
|
||||||
')\\]'+ '|' +
|
')\\]'+ '|' +
|
||||||
|
|||||||
Reference in New Issue
Block a user