fix: 修复开源版代码创建接口报错的问题

This commit is contained in:
CaptainB 2022-02-16 14:24:37 +08:00 committed by 刘瑞斌
parent bd001ec0b4
commit c4d7514bd0
3 changed files with 3 additions and 3 deletions

View File

@ -1378,7 +1378,7 @@ export default {
if (valid) {
await this.setParameter();
if (!this.currentScenario.versionId) {
if (this.$refs.versionHistory) {
if (this.$refs.versionHistory && this.$refs.versionHistory.currentVersion) {
this.currentScenario.versionId = this.$refs.versionHistory.currentVersion.id;
}
}

View File

@ -459,7 +459,7 @@ export default {
this.setParameter();
if (!this.httpForm.versionId) {
if (this.$refs.versionHistory) {
if (this.$refs.versionHistory && this.$refs.versionHistory.currentVersion) {
this.httpForm.versionId = this.$refs.versionHistory.currentVersion.id;
}
}

View File

@ -312,7 +312,7 @@ export default {
return;
}
if (!this.test.versionId) {
if (this.$refs.versionHistory) {
if (this.$refs.versionHistory && this.$refs.versionHistory.currentVersion) {
this.test.versionId = this.$refs.versionHistory.currentVersion.id;
}
}