Skip to content

Commit fdacc9a

Browse files
committed
fix: add check for undefined severity in getCompiledThreats util
1 parent 83d3695 commit fdacc9a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Shared/Components/Security/utils.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ export const getCompiledSecurityThreats = (scanResult: ScanResultDTO): Partial<R
4343
subCategory === SUB_CATEGORIES.MISCONFIGURATIONS
4444
? scanResult[category][subCategory]?.misConfSummary?.status
4545
: scanResult[category][subCategory]?.summary?.severities
46-
threatsArray.push(severity)
46+
47+
if (severity && Object.keys(severity).length) {
48+
threatsArray.push(severity)
49+
}
4750
})
4851
})
4952

0 commit comments

Comments
 (0)