fix: guard against undefined route.name in auth layout check

route.name can be undefined during initial route resolution or for
unnamed routes. Without this guard, AUTH_ROUTE_NAMES.has() would
return false and the authenticated layout could flash briefly.
This commit is contained in:
kolaente
2026-02-06 10:49:38 +01:00
parent e9a6abfe44
commit cdca790325

View File

@@ -58,7 +58,7 @@ const baseStore = useBaseStore()
const route = useRoute()
const showAuthLayout = computed(() => authStore.authUser && !AUTH_ROUTE_NAMES.has(route.name as string))
const showAuthLayout = computed(() => authStore.authUser && typeof route.name === 'string' && !AUTH_ROUTE_NAMES.has(route.name))
useBodyClass('is-touch', isTouchDevice())
const keyboardShortcutsActive = computed(() => baseStore.keyboardShortcutsActive)