Don't modify array in place.

This commit is contained in:
Federico Builes
2022-06-01 05:32:50 +02:00
parent 2dd55385c1
commit 7063d0ca45
3 changed files with 5 additions and 5 deletions

4
dist/index.js generated vendored
View File

@@ -13684,8 +13684,8 @@ function filterChangesBySeverity(severity, changes) {
});
}
// don't want to deal with changes with no vulnerabilities
changes = changes.filter((change) => change.vulnerabilities.length > 0);
return changes;
let filteredChanges = changes.filter((change) => change.vulnerabilities.length > 0);
return filteredChanges;
}
exports.filterChangesBySeverity = filterChangesBySeverity;

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@@ -19,6 +19,6 @@ export function filterChangesBySeverity(severity: Severity, changes: Changes): C
}
// don't want to deal with changes with no vulnerabilities
changes = changes.filter((change: any) => change.vulnerabilities.length > 0)
return changes
let filteredChanges = changes.filter((change: any) => change.vulnerabilities.length > 0)
return filteredChanges
}