Revert "fix(expression): should reset lastIndex of regular"

This reverts commit da6ae90231.
This commit is contained in:
Rain 2023-10-09 10:41:55 +08:00
parent da6ae90231
commit 67f01db779

View File

@ -399,10 +399,6 @@ export function TextArea(props) {
async function preloadOptions(scope, value) { async function preloadOptions(scope, value) {
const options = cloneDeep(scope ?? []); const options = cloneDeep(scope ?? []);
// 重置正则的匹配位置
VARIABLE_RE.lastIndex = 0;
for (let matcher; (matcher = VARIABLE_RE.exec(value ?? '')); ) { for (let matcher; (matcher = VARIABLE_RE.exec(value ?? '')); ) {
const keys = matcher[1].split('.'); const keys = matcher[1].split('.');