From e8fb1d01fa95bd83bb88faf1edac25056db201e5 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Mon, 17 Jan 2022 13:56:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B=E5=A4=8D=E5=88=B6=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/track/case/components/TestCaseEdit.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/business/components/track/case/components/TestCaseEdit.vue b/frontend/src/business/components/track/case/components/TestCaseEdit.vue index 229e51bc42..fcf13dd7e3 100644 --- a/frontend/src/business/components/track/case/components/TestCaseEdit.vue +++ b/frontend/src/business/components/track/case/components/TestCaseEdit.vue @@ -961,9 +961,13 @@ export default { }, getVersionHistory(param) { this.$get('/test/case/versions/' + this.currentTestCaseInfo.id, response => { - for (let i = 0; i < response.data.length; i++) { - this.currentProjectId = response.data[i].projectId; + if (response.data.length > 0) { + for (let i = 0; i < response.data.length; i++) { + this.currentProjectId = response.data[i].projectId; } + } else { + this.currentProjectId = getCurrentProjectID(); + } this.versionData = response.data; this.$refs.versionHistory.cancelOtherInfo(); this.$refs.versionHistory.loading = false;