fix(接口测试): 爆栈修复

This commit is contained in:
baiqi 2024-08-13 15:59:14 +08:00 committed by 刘瑞斌
parent 14beaee8b9
commit 52899f70ce
1 changed files with 6 additions and 1 deletions

View File

@ -267,13 +267,18 @@
() => innerParams.value.formDataBody.formValues, () => innerParams.value.formDataBody.formValues,
() => { () => {
if (innerParams.value.formDataBody.formValues.length > 0) { if (innerParams.value.formDataBody.formValues.length > 0) {
innerParams.value.formDataBody.formValues = innerParams.value.formDataBody.formValues.map((item) => { let hasNullFiles = false;
const newValues = innerParams.value.formDataBody.formValues.map((item) => {
// files null // files null
hasNullFiles = item.files === null;
return { return {
...item, ...item,
files: item.files ? item.files : [], files: item.files ? item.files : [],
}; };
}); });
if (hasNullFiles) {
innerParams.value.formDataBody.formValues = newValues;
}
} }
}, },
{ {