Skip to content

Commit

Permalink
fix(ui): UI crashes on rollout view due to undefined status (argoproj…
Browse files Browse the repository at this point in the history
…#1287)

Signed-off-by: Remington Breeze <remington@breeze.software>
  • Loading branch information
rbreeze authored and mbhatip committed Jun 22, 2021
1 parent c90a91a commit afcdefc
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 afcdefc

Please sign in to comment.