fix: prevent null history.state errors in modal routing and task navigation (#1368)

This commit is contained in:
Copilot 2025-08-31 19:14:25 +00:00 committed by GitHub
parent 7510f8d4be
commit 14e1bd2f55
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ import {useProjectStore} from '@/stores/projects'
export function useRouteWithModal() {
const router = useRouter()
const route = useRoute()
const backdropView = computed(() => route.fullPath ? window.history.state.backdropView : undefined)
const backdropView = computed(() => route.fullPath ? window.history.state?.backdropView : undefined)
const baseStore = useBaseStore()
const projectStore = useProjectStore()

View File

@ -28,7 +28,7 @@
:key="p.id"
>
<a
v-if="router.options.history.state.back?.includes('/projects/'+p.id+'/') || false"
v-if="router.options.history.state?.back?.includes('/projects/'+p.id+'/') || false"
v-shortcut="p.id === project?.id ? 'u' : ''"
@click="router.back()"
>