Skip to content

Commit ccc9476

Browse files
authored
Merge pull request #75 from cheshire-cat-ai/develop
Update App.vue
2 parents a03431c + 81a751d commit ccc9476

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/App.vue

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import { useSettings } from '@stores/useSettings'
33
import ModalBox from '@components/ModalBox.vue'
44
import { updateAuthKey } from '@/api'
55
import useStoreMapping from '@/utils/storeRouteMapping'
6+
import type { RouteRecordName } from 'vue-router'
67
7-
const routesToExclude = ['home', 'settings']
8+
const routesToExclude: RouteRecordName[] = ['home', 'settings']
89
const route = useRoute()
910
const { storeMapping } = useStoreMapping()
1011
const settings = useSettings()
@@ -30,10 +31,8 @@ const authenticate = async () => {
3031
}
3132
3233
const currentComponentLoading = computed(() => {
33-
const routeName = route.name?.toString()
34-
let store
35-
if (routeName !== undefined && !routesToExclude.includes(routeName)) {
36-
store = storeMapping[routeName as keyof typeof storeMapping]
34+
if (route.name !== undefined && !routesToExclude.includes(route.name ?? '')) {
35+
const store = storeMapping[route.name as keyof typeof storeMapping]
3736
const { currentState } = storeToRefs(store)
3837
return store && currentState.value.loading
3938
}

0 commit comments

Comments
 (0)