Skip to content

Commit 5656a94

Browse files
committed
added 1 fail safe check
1 parent 27c8967 commit 5656a94

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/workflowEditor/workflowEditor.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,6 @@ class WorkflowEdit extends Component<WorkflowEditProps, WorkflowEditState> {
352352
`${this.props.match.path}/${pipeline}/:ciPipelineId/cd-pipeline/:cdPipelineId`,
353353
)}
354354
render={({ location, match }: { location: any; match: any }) => {
355-
const cdNode = this.state.allDeploymentNodeMap.get(match.params.cdPipelineId)
356355
return (
357356
<NewCDPipeline
358357
match={match}
@@ -362,7 +361,9 @@ class WorkflowEdit extends Component<WorkflowEditProps, WorkflowEditState> {
362361
getWorkflows={this.getWorkflows}
363362
refreshParentWorkflows={this.props.getWorkflows}
364363
envIds={this.state.envIds}
365-
isLastNode={cdNode['isLast']}
364+
isLastNode={
365+
this.state.allDeploymentNodeMap.get(match.params.cdPipelineId)?.['isLast']
366+
}
366367
/>
367368
)
368369
}}

0 commit comments

Comments
 (0)