Skip to content

Commit bc635cd

Browse files
authored
fix(task): keep the "end" step (#113)
1 parent e4c61ff commit bc635cd

File tree

1 file changed

+2
-3
lines changed
  • apps/main/[4]task/components/TaskSteps

1 file changed

+2
-3
lines changed

apps/main/[4]task/components/TaskSteps/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,8 @@ const useActiveStep = (stepLen: number) => {
5757
type StepMap = Record<string, TaskWorkflowSubTaskInfo>
5858

5959
const getExecutedStepData = (steps: TaskWorkflowSubTaskInfo[]) => {
60-
const executedSteps = steps.filter(
61-
(step) => ['end', 'fail'].indexOf(step.name!) === -1
62-
)
60+
const FAILED_STEP_NAME = 'fail'
61+
const executedSteps = steps.filter((step) => step.name !== FAILED_STEP_NAME)
6362
const executedStepMap: StepMap = executedSteps?.reduce((prev, step) => {
6463
return {
6564
...prev,

0 commit comments

Comments
 (0)