fix(接口测试): 历史遗留数据兼容,支持自动跳转测试页面

--bug=1018125 --user=赵勇 【接口测试】接口定义列表中执行某个接口不会跳转到TEST页面 https://www.tapd.cn/55049933/s/1262554
This commit is contained in:
fit2-zhao 2022-10-15 17:08:36 +08:00 committed by f2c-ci-robot[bot]
parent ef8550bac0
commit 3d2301327d
1 changed files with 5 additions and 1 deletions

View File

@ -855,7 +855,11 @@ export default {
if (Object.prototype.toString.call(row.response).match(/\[object (\w+)\]/)[1].toLowerCase() === 'object') {
response = row.response;
} else {
response = JSON.parse(row.response);
try {
response = JSON.parse(row.response);
}catch (e){
response = {};
}
}
} else {
response = {headers: [], body: new Body(), statusCode: [], type: "HTTP"};