UI: Fixes asynchronous when destroying wrong item VM (#5884)

* fix asynchronous error when deleting VMs one by one

* fixes error open modal
This commit is contained in:
Hoang Nguyen 2022-01-27 12:35:35 +07:00 committed by GitHub
parent 28f6067f3c
commit 065847e6af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -913,8 +913,10 @@ export default {
}
}
if (this.items.length > 0) {
this.resource = this.items[0]
this.$emit('change-resource', this.resource)
if (!this.showAction) {
this.resource = this.items[0]
this.$emit('change-resource', this.resource)
}
} else {
if (this.dataView) {
this.$router.push({ path: '/exception/404' })