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
Generated Vendored
+2 -2
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;
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
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
}