fix: add null/undefined checks for maxPermission in AppHeader.vue

This commit is contained in:
kolaente 2025-11-22 14:50:20 +01:00
parent cdb39c945c
commit aadf0e4c17
1 changed files with 1 additions and 1 deletions

View File

@ -137,7 +137,7 @@ import { useAuthStore } from '@/stores/auth'
const baseStore = useBaseStore()
const currentProject = computed(() => baseStore.currentProject)
const background = computed(() => baseStore.background)
const canWriteCurrentProject = computed(() => baseStore.currentProject?.maxPermission > Permissions.READ)
const canWriteCurrentProject = computed(() => baseStore.currentProject?.maxPermission !== null && baseStore.currentProject?.maxPermission !== undefined && baseStore.currentProject.maxPermission > Permissions.READ)
const menuActive = computed(() => baseStore.menuActive)
const authStore = useAuthStore()