chore: don't set the current project to null if it's undefined already
This commit is contained in:
parent
b69a05689b
commit
e4d97e0520
@ -81,7 +81,7 @@ export const useBaseStore = defineStore('base', () => {
|
||||
async function handleSetCurrentProject(
|
||||
{project, forceUpdate = false}: {project: IProject | null, forceUpdate?: boolean},
|
||||
) {
|
||||
if (project === null) {
|
||||
if (project === null || typeof project === 'undefined') {
|
||||
setCurrentProject({})
|
||||
setBackground('')
|
||||
setBlurHash('')
|
||||
|
@ -18,7 +18,7 @@
|
||||
<router-link :to="{ name: 'project.index', params: { projectId: p.id } }">
|
||||
{{ getProjectTitle(p) }}
|
||||
</router-link>
|
||||
<span class="has-text-grey-light" v-if="p.id !== project.id"> > </span>
|
||||
<span class="has-text-grey-light" v-if="p.id !== project?.id"> > </span>
|
||||
</template>
|
||||
</h6>
|
||||
|
||||
@ -539,7 +539,7 @@ const visible = ref(false)
|
||||
|
||||
const taskId = toRef(props, 'taskId')
|
||||
|
||||
const project = computed(() => task.projectId ? projectStore.projects[task.projectId] : null)
|
||||
const project = computed(() => projectStore.projects[task.projectId])
|
||||
watchEffect(() => {
|
||||
baseStore.handleSetCurrentProject({
|
||||
project: project.value,
|
||||
|
Loading…
x
Reference in New Issue
Block a user