fix(测试跟踪): 快速切换共用例库和用例列表会报错

--bug=1014880 --user=陈建星 【测试跟踪】快速切换共用例库到用例列表页面,页面有报错 https://www.tapd.cn/55049933/s/1202811
This commit is contained in:
chenjianxing 2022-07-15 16:59:54 +08:00 committed by f2c-ci-robot[bot]
parent ab8a186582
commit bd04a5bba0
1 changed files with 4 additions and 2 deletions

View File

@ -331,8 +331,10 @@ export default {
this.result = this.$post('/test/case/public/case/node', {workspaceId: getCurrentWorkspaceId()}, res => {
this.publicTreeNodes = res.data;
this.publicTreeNodes.forEach(firstLevel => {
this.$refs.publicNodeTree.nodeExpand(firstLevel);
})
if (this.$refs.publicNodeTree) {
this.$refs.publicNodeTree.nodeExpand(firstLevel);
}
});
})
} else {
this.activeName = 'default';