1
0
Fork 0

fix: do not use computed outside of components...

This commit is contained in:
Daniel Herrmann 2024-03-03 09:20:35 +01:00
parent 071daabe19
commit 290c4d0e7b
1 changed files with 1 additions and 3 deletions

View File

@ -1,4 +1,3 @@
import {computed} from 'vue'
import { createRouter, createWebHistory } from 'vue-router'
import type { RouteLocation } from 'vue-router'
import {saveLastVisited} from '@/helpers/saveLastVisited'
@ -353,14 +352,13 @@ const router = createRouter({
// Project default view
const configStore = useConfigStore()
const defaultProjectView = computed(() => configStore.defaultProjectView)
if (savedProjectView) {
console.log('Replaced list view with', savedProjectView)
}
return {
name: savedProjectView || defaultProjectView,
name: savedProjectView || configStore.defaultProjectView,
params: {projectId: to.params.projectId},
}
},