fix(接口测试): 修复接口测试场景调试报错的缺陷

【【接口测试】保存/调试场景,控制台报错“TypeError: Cannot read properties of undefined
(reading
'originalData')”】https://www.tapd.cn/55049933/bugtrace/bugs/view?bug_id=1155049933001014305
This commit is contained in:
wxg0103 2022-06-22 17:56:44 +08:00 committed by fit2-zhao
parent c323ce10be
commit 229c329ae4
1 changed files with 1 additions and 1 deletions

View File

@ -181,7 +181,7 @@ export function mergeRequestDocumentData(request) {
if (request && request.hashTree && request.hashTree.length > 0) {
let index = request.hashTree.findIndex(item => item.type === 'Assertions');
if (index !== -1) {
if (request.hashTree[index].document.originalData && request.hashTree[index].document.tableData.size && request.hashTree[index].document.tableData.size !== 0) {
if (request.hashTree[index].document && request.hashTree[index].document.originalData && request.hashTree[index].document.tableData.size && request.hashTree[index].document.tableData.size !== 0) {
mergeDocumentData(request.hashTree[index].document.originalData, request.hashTree[index].document.tableData);
request.hashTree[index].document.data.json = request.hashTree[index].document.originalData;
}