Explorar el Código

parameters: fix error on missing tab query parameter

Olivier Massot hace 2 años
padre
commit
9cb9ef82dd
Se han modificado 1 ficheros con 6 adiciones y 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
   })