diff --git a/lib/Model.js b/lib/Model.js index 9bb00635..0d79bd8d 100644 --- a/lib/Model.js +++ b/lib/Model.js @@ -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 }`;