fix(测试计划): 修复测试计划快捷创建缺陷用例步骤bug

This commit is contained in:
xinxin.wu 2024-10-24 10:00:37 +08:00 committed by Craftsman
parent 1bc820485a
commit 6d270e13ca
1 changed files with 4 additions and 3 deletions

View File

@ -76,6 +76,10 @@ function getStepsTable(steps: string) {
},
},
];
if (!steps.length) {
return '-';
}
const stepsData = JSON.parse(steps).map((item: any, index: number) => {
return {
num: index + 1,
@ -87,9 +91,6 @@ function getStepsTable(steps: string) {
status: item.executeResult,
};
});
if (!stepsData.length) {
return '-';
}
return generateTableHTML(templateFieldColumns, stepsData);
}