Skip to content

Commit

Permalink
fix: Do not crash when nyc is run inside itself.
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyfarrell committed Apr 16, 2019
1 parent 49c45fd commit d097031
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -223,7 +223,7 @@ class ProcessDB {
infos.forEach(info => {
if (info.parent) {
const parentInfo = infoByUid.get(info.parent)
if (parentInfo.children.indexOf(info.uuid) === -1) {
if (parentInfo && !parentInfo.children.includes(info.uuid)) {
parentInfo.children.push(info.uuid)
}
}
Expand Down

0 comments on commit d097031

Please sign in to comment.