renderer: fix title key null check
This commit is contained in:
1 parent
1e556be215
commit
2abd0865d7
1 file changed
+2
-1
@@ -3,6 +3,7 @@ import { useRoute, useRouter } from 'vue-router'
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const titleKey: string = (route?.meta?.titleKey || 'title.main') as string
|
||||
|
||||
const handleRoute = (path: string): void => {
|
||||
router.push(path)
|
||||
@@ -14,7 +15,7 @@ const isCurrentRoute = (path: string): boolean => {
|
||||
</script>
|
||||
<template>
|
||||
<v-app-bar color="primary" density="compact">
|
||||
<v-app-bar-title>{{ $t($route.meta.titleKey || 'title.main') }}</v-app-bar-title>
|
||||
<v-app-bar-title>{{ $t(titleKey) }}</v-app-bar-title>
|
||||
<template #append>
|
||||
<v-btn
|
||||
prepend-icon="mdi-home"
|
||||
|
||||
Reference in new issue
Block a user