Skip to content

Commit

Permalink
fix(ui): UI crashes on rollout view due to undefined status (#1287)
Browse files Browse the repository at this point in the history
Signed-off-by: Remington Breeze <remington@breeze.software>
  • Loading branch information
rbreeze authored Jun 17, 2021
1 parent 7a23fe5 commit e2f87a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/src/app/components/rollout/rollout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export const Rollout = () => {
</div>
</ThemeDiv>
)}
{(rollout.strategy || '').toLowerCase() === 'canary' && rollout.steps && rollout.steps.length > 0 && (
{(rollout?.strategy || '').toLowerCase() === 'canary' && rollout.steps && rollout.steps.length > 0 && (
<ThemeDiv className='info steps'>
<ThemeDiv className='info__title'>Steps</ThemeDiv>
<div style={{marginTop: '1em'}}>
Expand Down Expand Up @@ -338,7 +338,7 @@ const AnalysisRunWidget = (props: {analysisRuns: RolloutAnalysisRunInfo[]}) => {
<div>Created at {formatTimestamp(JSON.stringify(ar.objectMeta.creationTimestamp))}</div>
</React.Fragment>
}>
<ThemeDiv className={`analysis__run analysis__run--${ar.status.toLowerCase() || 'unknown'}`} />
<ThemeDiv className={`analysis__run analysis__run--${ar.status ? ar.status.toLowerCase() : 'unknown'}`} />
</Tooltip>
))}
</div>
Expand Down

0 comments on commit e2f87a4

Please sign in to comment.