Skip to content

Commit

Permalink
fix: canary parser when steps is null or empty
Browse files Browse the repository at this point in the history
  • Loading branch information
mvgmb committed May 25, 2022
1 parent 886a3a5 commit 489a7e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ const parseCurrentCanaryStep = (
): { currentStep: any; currentStepIndex: number } => {
const { status, spec } = resource;
const canary = spec.strategy?.canary;
if (!canary || canary.steps.length === 0) {
return null;
if (!canary || !canary.steps || canary.steps.length === 0) {
return { currentStep: null, currentStepIndex: -1 };
}
let currentStepIndex = 0;
if (status.currentStepIndex) {
Expand Down

0 comments on commit 489a7e3

Please sign in to comment.