Skip to content

Commit

Permalink
Merge pull request #442 from PagerDuty/issue-441
Browse files Browse the repository at this point in the history
fix #441
  • Loading branch information
gsreynolds authored Jun 13, 2024
2 parents 36e4ed2 + 2f4c867 commit eb32d5f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/config/column-generator.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,17 @@ export const defaultAlertsColumns = () => [
id: 'severity',
header: 'Severity',
columnType: 'alert',
accessor: (incident) => incident.alerts?.[0]?.body?.cef_details?.severity || '',
accessor: (incident) => {
if (
incident.alerts
&& incident.alerts instanceof Array
&& incident.alerts.length > 0
&& incident.alerts[0] instanceof Object
) {
return incident.alerts[0].severity || '--';
}
return '--';
},
minWidth: 100,
renderer: ({
value, cell,
Expand Down

0 comments on commit eb32d5f

Please sign in to comment.