fix: association field in subtable triggering request when iteration variable with empty value (#6969)

This commit is contained in:
Katherine 2025-05-30 11:47:16 +08:00 committed by GitHub
parent 46f7654cc0
commit 208e265f77
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -434,7 +434,7 @@ export async function replaceVariables(
const waitForParsing = value.match(REGEX_OF_VARIABLE_IN_EXPRESSION)?.map(async (item) => {
const { value: parsedValue } = await variables.parseVariable(item, localVariables, {
doNotRequest: item.includes('$nForm'),
doNotRequest: item.includes('$nForm') || item.includes('$iteration'),
});
// 在开头加 `_` 是为了保证 id 不能以数字开头,否则在解析表达式的时候(不是解析变量)会报错

View File

@ -357,7 +357,7 @@ function shouldToRequest(value, variableCtx: Record<string, any>, variablePath:
return;
}
result = value !== null && _.isEmpty(value);
result = _.isEmpty(value);
});
return result;