Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/vue_shared/alert_details/components/alert_details.vue')
-rw-r--r--app/assets/javascripts/vue_shared/alert_details/components/alert_details.vue7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/assets/javascripts/vue_shared/alert_details/components/alert_details.vue b/app/assets/javascripts/vue_shared/alert_details/components/alert_details.vue
index f2ea55df63d..96c2ffa929c 100644
--- a/app/assets/javascripts/vue_shared/alert_details/components/alert_details.vue
+++ b/app/assets/javascripts/vue_shared/alert_details/components/alert_details.vue
@@ -145,11 +145,14 @@ export default {
},
currentTabIndex: {
get() {
- return this.$options.tabsConfig.findIndex((tab) => tab.id === this.activeTab);
+ const tabIndex = this.$options.tabsConfig.findIndex((tab) => tab.id === this.activeTab);
+ return tabIndex >= 0 ? tabIndex : 0;
},
set(tabIdx) {
const tabId = this.$options.tabsConfig[tabIdx].id;
- this.$router.replace({ name: 'tab', params: { tabId } });
+ if (this.$route.params?.tabId !== tabId) {
+ this.$router.push({ name: 'tab', params: { tabId } });
+ }
},
},
environmentName() {