Skip to content

Commit

Permalink
Merge pull request #184 from NavaraBV/master
Browse files Browse the repository at this point in the history
fix: via link resolving for npm 7
  • Loading branch information
quinnturner authored Jun 15, 2021
2 parents 9701fb8 + 5d07400 commit 89c6569
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Model.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ class Model {
let { via } = vulnerability;

if (typeof via[0] === "string") {
via = parsedOutput.vulnerabilities[via[0]].via;
do {
via = parsedOutput.vulnerabilities[via[index] || via[0]].via;
} while (typeof via[0] === "string");
(via[index] || via[0]).paths = `${vulnerability.name}>${
(via[index] || via[0]).name
}`;
Expand Down

0 comments on commit 89c6569

Please sign in to comment.