From 73b1a8eea9fc7489685af0adc3ac05e290c22258 Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 23 Dec 2024 11:43:32 -0500 Subject: [PATCH] Refined if check for N/A severity level values - Now includes permutations of NUll, N/A, empty string, and undefined values. --- frontend/src/components/DrawerInterior.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/DrawerInterior.tsx b/frontend/src/components/DrawerInterior.tsx index 002687c7..25be18ad 100644 --- a/frontend/src/components/DrawerInterior.tsx +++ b/frontend/src/components/DrawerInterior.tsx @@ -179,14 +179,16 @@ export const DrawerInterior: React.FC = (props) => { ) : []; + // To-Do: Create array(s) to handle permutations of null and N/A values const titleCaseSeverityFacet = facets['vulnerabilities.severity'] ? facets['vulnerabilities.severity'][0].data.map( (d: { value: string; count: number }) => { if ( - d.value === 'null' || d.value === null || + d.value === 'null' || + d.value === 'NULL' || + d.value === undefined || d.value === '' || - d.value === 'undefined' || d.value === 'N/A' ) { return { value: 'N/A', count: d.count };