Skip to content

Commit 2d22640

Browse files
daengdaengLeeenneitex
authored andcommitted
fix: add optional chaining before access to the targetRevision field (argoproj#23397)
Signed-off-by: daengdaengLee <[email protected]> Signed-off-by: enneitex <[email protected]>
1 parent dd4f46c commit 2d22640

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/src/app/applications/components/applications-list/applications-labels.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import './applications-labels.scss';
88
export const ApplicationsLabels = ({app}: {app: Application}) => {
99
const labels = (
1010
<>
11-
<span className='application-labels__item'>{getAppDefaultSource(app).targetRevision || 'HEAD'}</span>
11+
<span className='application-labels__item'>{getAppDefaultSource(app)?.targetRevision || 'HEAD'}</span>
1212
{Object.keys(app.metadata.labels || {}).map(label => (
1313
<span className='application-labels__item' key={label}>{`${label}=${app.metadata.labels[label]}`}</span>
1414
))}

0 commit comments

Comments
 (0)