diff --git a/packages/devtools/client/middleware/route.global.ts b/packages/devtools/client/middleware/route.global.ts index c9db38014e..76f9b5e9b4 100644 --- a/packages/devtools/client/middleware/route.global.ts +++ b/packages/devtools/client/middleware/route.global.ts @@ -1,9 +1,11 @@ import { isFirstVisit } from '~/composables/storage' -import { telemetryEnabled } from '~/composables/telemetry' export default defineNuxtRouteMiddleware((to) => { - if (to.path === '/' && !(isFirstVisit.value || telemetryEnabled.value == null)) + if (isFirstVisit.value) { + if (to.path !== '/') + return navigateTo('/') + } + else if (to.path === '/') { return navigateTo('/modules/overview') - else if (to.path !== '/' && telemetryEnabled.value == null) - return navigateTo('/') + } })