Skip to content

Commit

Permalink
fix: ensure labels is defined before key access. Fixes #11602 (#11638)
Browse files Browse the repository at this point in the history
Signed-off-by: Isitha Subasinghe <isitha@pipekit.io>
  • Loading branch information
isubasinghe authored Aug 28, 2023
1 parent 0cffdff commit d99efa7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ export class WorkflowsRow extends React.Component<WorkflowsRowProps, WorkflowRow
</div>
<div className='columns small-1'>{isArchivedWorkflow(wf) ? 'true' : 'false'}</div>
{(this.props.columns || []).map(column => {
const value = wf.metadata?.labels[column.key];
// best not to make any assumptions and wait until this data is filled
const value = wf?.metadata?.labels?.[column.key] ?? 'unknown';
return (
<div key={column.name} className='columns small-1'>
{value}
Expand Down

0 comments on commit d99efa7

Please sign in to comment.