fix(task): setting a label would not show up on the kanban board after setting it
This commit is contained in:
@ -75,12 +75,11 @@ export const useKanbanStore = defineStore('kanban', {
|
||||
getTaskById(state) {
|
||||
return (id: ITask['id']) => {
|
||||
const { bucketIndex, taskIndex } = getTaskIndicesById(state, id)
|
||||
|
||||
|
||||
return {
|
||||
bucketIndex,
|
||||
taskIndex,
|
||||
task: bucketIndex && taskIndex && state.buckets[bucketIndex]?.tasks?.[taskIndex] || null,
|
||||
task: bucketIndex !== null && taskIndex !== null && state.buckets[bucketIndex]?.tasks?.[taskIndex] || null,
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -252,7 +252,7 @@ export const useTaskStore = defineStore('task', {
|
||||
// Don't try further adding a label if the task is not in kanban
|
||||
// Usually this means the kanban board hasn't been accessed until now.
|
||||
// Vuex seems to have its difficulties with that, so we just log the error and fail silently.
|
||||
console.debug('Could not add label to task in kanban, task not found', t)
|
||||
console.debug('Could not add label to task in kanban, task not found', {taskId, t})
|
||||
return r
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user