mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-03-12 01:59:34 -05:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user