fix(测试跟踪): 脑图保存临时节点后,部分节点没保存成功

--bug=1015426 --user=陈建星 【测试跟踪】github#15841,未设置标签,点击保存后,用例全没了 https://www.tapd.cn/55049933/s/1213457
This commit is contained in:
chenjianxing 2022-07-27 13:45:00 +08:00 committed by f2c-ci-robot[bot]
parent b5ec329860
commit 74e0788ee2
1 changed files with 3 additions and 2 deletions

View File

@ -398,12 +398,13 @@ name: "TestCaseMinder",
buildExtraNode(data, parent, root) {
if (data.type !== 'node' && data.type !== 'tmp' && parent && isModuleNodeData(parent) && data.changed === true) {
//
let nodes = this.saveExtraNode[parent.id];
let pId = parent.newId ? parent.newId : parent.id;
let nodes = this.saveExtraNode[pId];
if (!nodes) {
nodes = [];
}
nodes.push(JSON.stringify(this._buildExtraNode(root)));
this.saveExtraNode[parent.newId ? parent.newId : parent.id] = nodes;
this.saveExtraNode[pId] = nodes;
}
},
validate(parent, data) {