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) } },