From 67bbac5d00c7d43e502b3d4b1e6f911c7327e05a Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Fri, 22 Dec 2023 14:23:53 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E6=A0=91=E5=89=8D=E7=AB=AF=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E5=8F=B0=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1033906 --user=宋昌昌 【测试跟踪】点击功能测试tab页,前端会有报错 https://www.tapd.cn/55049933/s/1447450 --- test-track/frontend/src/business/module/TestCaseNodeTree.vue | 2 +- .../frontend/src/business/module/TestCaseReviewNodeTree.vue | 2 +- test-track/frontend/src/business/module/TestPlanNodeTree.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test-track/frontend/src/business/module/TestCaseNodeTree.vue b/test-track/frontend/src/business/module/TestCaseNodeTree.vue index b1cc9695bf..e2c92f3eaf 100644 --- a/test-track/frontend/src/business/module/TestCaseNodeTree.vue +++ b/test-track/frontend/src/business/module/TestCaseNodeTree.vue @@ -247,7 +247,7 @@ export default { } }, justSetCurrentKey() { - if (this.$refs.nodeTree) { + if (this.$refs.nodeTree && this.currentNode.data) { this.$refs.nodeTree.justSetCurrentKey(this.currentNode.data.id) } }, diff --git a/test-track/frontend/src/business/module/TestCaseReviewNodeTree.vue b/test-track/frontend/src/business/module/TestCaseReviewNodeTree.vue index 57780cbe9a..ca294dcaa6 100644 --- a/test-track/frontend/src/business/module/TestCaseReviewNodeTree.vue +++ b/test-track/frontend/src/business/module/TestCaseReviewNodeTree.vue @@ -132,7 +132,7 @@ export default { this.$emit("nodeSelectEvent", node, node.data.id === 'root' ? [] : nodeIds, pNodes); }, justSetCurrentKey() { - if (this.$refs.nodeTree) { + if (this.$refs.nodeTree && this.currentNode.data) { this.$refs.nodeTree.justSetCurrentKey(this.currentNode.data.id) } }, diff --git a/test-track/frontend/src/business/module/TestPlanNodeTree.vue b/test-track/frontend/src/business/module/TestPlanNodeTree.vue index c82eb4ec15..8d69d2e556 100644 --- a/test-track/frontend/src/business/module/TestPlanNodeTree.vue +++ b/test-track/frontend/src/business/module/TestPlanNodeTree.vue @@ -132,7 +132,7 @@ export default { this.$emit("nodeSelectEvent", node, node.data.id === 'root' ? [] : nodeIds, pNodes); }, justSetCurrentKey() { - if (this.$refs.nodeTree) { + if (this.$refs.nodeTree && this.currentNode.data) { this.$refs.nodeTree.justSetCurrentKey(this.currentNode.data.id) } },