Skip to content

Commit

Permalink
fix #441
Browse files Browse the repository at this point in the history
  • Loading branch information
martindstone committed Jun 5, 2024
1 parent 36e4ed2 commit 2f4c867
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 2f4c867

Please sign in to comment.