fix(task record): resume from the first step to not have ended
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user