Don't modify array in place.
This commit is contained in:
+2
-2
@@ -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;
|
||||
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+2
-2
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user