From 065847e6af29723bec7ef2de4908132ad0f2e946 Mon Sep 17 00:00:00 2001 From: Hoang Nguyen Date: Thu, 27 Jan 2022 12:35:35 +0700 Subject: [PATCH] UI: Fixes asynchronous when destroying wrong item VM (#5884) * fix asynchronous error when deleting VMs one by one * fixes error open modal --- ui/src/views/AutogenView.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/src/views/AutogenView.vue b/ui/src/views/AutogenView.vue index ed2d5a3f5ee..6454868b14e 100644 --- a/ui/src/views/AutogenView.vue +++ b/ui/src/views/AutogenView.vue @@ -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' })