Explorar o código

parameters: fix error on missing tab query parameter

Olivier Massot %!s(int64=2) %!d(string=hai) anos
pai
achega
9cb9ef82dd
Modificáronse 1 ficheiros con 6 adicións e 2 borrados
  1. 6 2
      pages/parameters/index.vue

+ 6 - 2
pages/parameters/index.vue

@@ -107,9 +107,13 @@ Page Paramètres
 
   onMounted(() => {
     if (!route.query || !route.query.tab || !tabs.includes(route.query.tab as string)) {
-      updateQuery(tabs[0] ?? 'general_parameters')
+      const tab = tabs[0] ?? 'general_parameters'
+      currentTab.value = tab
+      updateQuery(tab)
+    } else {
+      currentTab.value = route.query.tab as string
     }
-    currentTab.value = route.query.tab as string
+
     mounted = true
   })