From 1214155f9c499898cccca66c9e663b5d84d7e4aa Mon Sep 17 00:00:00 2001 From: Gabi Dobocan Date: Fri, 10 Feb 2023 12:52:10 +0200 Subject: [PATCH] fix: crash for undefined dependencyVulnerabilities --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 492a0be..da1c534 100644 --- a/src/index.js +++ b/src/index.js @@ -112,7 +112,7 @@ const getReport = async ({ return { dependencyGraph: dGraph, - dependencyVulnerabilities: dependencyVulnerabilities.filter( + dependencyVulnerabilities: (dependencyVulnerabilities || []).filter( ({findings: {affects}}) => affects.length, ), rootVulnerabilities,