diff --git a/frontend/src/components/home/AppHeader.vue b/frontend/src/components/home/AppHeader.vue index 6790dfa57..9bcc2fc98 100644 --- a/frontend/src/components/home/AppHeader.vue +++ b/frontend/src/components/home/AppHeader.vue @@ -133,9 +133,14 @@ import { isEditorContentEmpty } from '@/helpers/editorContentEmpty' import { useBaseStore } from '@/stores/base' import { useConfigStore } from '@/stores/config' import { useAuthStore } from '@/stores/auth' +import type { IProject } from '@/modelTypes/IProject' const baseStore = useBaseStore() -const currentProject = computed(() => baseStore.currentProject) +// Create a mutable copy to satisfy type requirements (readonly deep -> mutable) +const currentProject = computed(() => { + const project = baseStore.currentProject + return project ? { ...project } as IProject : null +}) const background = computed(() => baseStore.background) const canWriteCurrentProject = computed(() => baseStore.currentProject?.maxPermission !== null && baseStore.currentProject?.maxPermission !== undefined && baseStore.currentProject.maxPermission > Permissions.READ) const menuActive = computed(() => baseStore.menuActive)