Skip to content

Commit e2f87a4

Browse files
authored
fix(ui): UI crashes on rollout view due to undefined status (argoproj#1287)
Signed-off-by: Remington Breeze <[email protected]>
1 parent 7a23fe5 commit e2f87a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/src/app/components/rollout/rollout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ export const Rollout = () => {
199199
</div>
200200
</ThemeDiv>
201201
)}
202-
{(rollout.strategy || '').toLowerCase() === 'canary' && rollout.steps && rollout.steps.length > 0 && (
202+
{(rollout?.strategy || '').toLowerCase() === 'canary' && rollout.steps && rollout.steps.length > 0 && (
203203
<ThemeDiv className='info steps'>
204204
<ThemeDiv className='info__title'>Steps</ThemeDiv>
205205
<div style={{marginTop: '1em'}}>
@@ -338,7 +338,7 @@ const AnalysisRunWidget = (props: {analysisRuns: RolloutAnalysisRunInfo[]}) => {
338338
<div>Created at {formatTimestamp(JSON.stringify(ar.objectMeta.creationTimestamp))}</div>
339339
</React.Fragment>
340340
}>
341-
<ThemeDiv className={`analysis__run analysis__run--${ar.status.toLowerCase() || 'unknown'}`} />
341+
<ThemeDiv className={`analysis__run analysis__run--${ar.status ? ar.status.toLowerCase() : 'unknown'}`} />
342342
</Tooltip>
343343
))}
344344
</div>

0 commit comments

Comments
 (0)