fix(接口测试): 场景执行插件协议请求时,body 访问错误修复
This commit is contained in:
parent
f4aa52f120
commit
85f06fb2a5
|
@ -1257,9 +1257,9 @@
|
|||
body: {
|
||||
...request.body,
|
||||
jsonBody: {
|
||||
...request.body.jsonBody,
|
||||
jsonSchema: request.body.jsonBody.jsonSchemaTableData
|
||||
? parseTableDataToJsonSchema(request.body.jsonBody.jsonSchemaTableData[0])
|
||||
...request.body?.jsonBody,
|
||||
jsonSchema: request.body?.jsonBody?.jsonSchemaTableData
|
||||
? parseTableDataToJsonSchema(request.body?.jsonBody?.jsonSchemaTableData?.[0])
|
||||
: undefined,
|
||||
},
|
||||
},
|
||||
|
|
|
@ -137,8 +137,8 @@ export function getStepDetails(steps: ScenarioStepItem[], details: Record<string
|
|||
body: {
|
||||
...currentDetail.body,
|
||||
jsonBody: {
|
||||
...currentDetail.body.jsonBody,
|
||||
jsonSchema: currentDetail.body.jsonBody.jsonSchema,
|
||||
...currentDetail.body?.jsonBody,
|
||||
jsonSchema: currentDetail.body?.jsonBody?.jsonSchema,
|
||||
jsonSchemaTableData: [], // 原树形结构存在循环引用,这里要去掉以免 axios 序列化失败
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue