Skip to content

Commit 89c6569

Browse files
authored
Merge pull request #184 from NavaraBV/master
fix: via link resolving for npm 7
2 parents 9701fb8 + 5d07400 commit 89c6569

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Model.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ class Model {
7777
let { via } = vulnerability;
7878

7979
if (typeof via[0] === "string") {
80-
via = parsedOutput.vulnerabilities[via[0]].via;
80+
do {
81+
via = parsedOutput.vulnerabilities[via[index] || via[0]].via;
82+
} while (typeof via[0] === "string");
8183
(via[index] || via[0]).paths = `${vulnerability.name}>${
8284
(via[index] || via[0]).name
8385
}`;

0 commit comments

Comments
 (0)