Skip to content

Commit

Permalink
fix(core/delivery): Fix an undefined when there is no firstActiveStage
Browse files Browse the repository at this point in the history
  • Loading branch information
jrsquared committed Apr 20, 2017
1 parent efde358 commit 00b08ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Expand Up @@ -121,10 +121,11 @@ export class Execution extends React.Component<IExecutionProps, IExecutionState>
return;
}
const index = stageIndex || 0;
const stageSummary = this.props.execution.stageSummaries[index] || { firstActiveStage: 0 };
const params = {
executionId: this.props.execution.id,
stage: index,
step: this.props.execution.stageSummaries[index].firstActiveStage
step: stageSummary.firstActiveStage
};

if (stateService.includes('**.execution', params)) {
Expand Down
1 change: 1 addition & 0 deletions app/scripts/modules/core/domain/IExecutionStage.ts
Expand Up @@ -19,6 +19,7 @@ export interface IExecutionStage extends IOrchestratedItem, IStage {
id: string;
tasks: IStageStep[];
context: IExecutionContext;
firstActiveStage?: number;
}

export interface IExecutionStageSummary extends IExecutionStage {
Expand Down

0 comments on commit 00b08ca

Please sign in to comment.