From 488e62bd79443dd96fd83e631cccf3f68da489b1 Mon Sep 17 00:00:00 2001 From: James Yang <26634873@qq.com> Date: Sat, 8 Jun 2019 00:25:16 +0800 Subject: [PATCH] Fix stringToPath bug for consecutive [] (#4319) --- .internal/stringToPath.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.internal/stringToPath.js b/.internal/stringToPath.js index bb40f6f544..8ba607eb1c 100644 --- a/.internal/stringToPath.js +++ b/.internal/stringToPath.js @@ -8,7 +8,7 @@ const rePropName = RegExp( // Or match property names within brackets. '\\[(?:' + // Match a non-string expression. - '([^"\'].*)' + '|' + + '([^"\'][^[]*)' + '|' + // Or match strings (supports escaping characters). '(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2' + ')\\]'+ '|' +