ui: Prevent reset of port-forward rules on cancelling a form (#4981)

* ui: Prevent reset of port-forward rules on cancelling a form

* add check for undefined value
This commit is contained in:
Pearl Dsilva 2021-05-04 19:34:53 +05:30 committed by GitHub
parent 1cb8ca69d9
commit 4df8d7ade3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -554,7 +554,7 @@ export default {
vpcid: this.resource.vpcid
}).then(json => {
this.tiers.data = json.listnetworksresponse.network || []
this.selectedTier = this.tiers.data && this.tiers.data[0].id ? this.tiers.data[0].id : null
this.selectedTier = this.tiers.data?.[0]?.id ? this.tiers.data[0].id : null
this.$forceUpdate()
}).catch(error => {
this.$notifyError(error)

View File

@ -503,7 +503,6 @@ export default {
this.addVmModalNicLoading = false
this.nics = []
this.resetTagInputs()
this.resetAllRules()
},
openTagsModal (id) {
this.tagsModalLoading = true