fix(task record): resume from the first step to not have ended

This commit is contained in:
Julien Calixte
2024-04-09 23:27:48 +02:00
parent 364d0b2eed
commit 046f33e0fb

View File

@@ -197,8 +197,8 @@ export const useTaskRecordStore = defineStore('task-record-store', {
} }
const nextStepIndex = task.steps.findIndex( const nextStepIndex = task.steps.findIndex(
(step) => // the first step that has not ended
!Object.keys(record.stepRecords).find((stepId) => stepId === step.id) (step) => record.stepRecords[step.id]?.end === undefined
) )
if (nextStepIndex >= 0) { if (nextStepIndex >= 0) {