Skip to content

Commit

Permalink
fix: ensure dedupe orders by most recent pub date
Browse files Browse the repository at this point in the history
Fixes SC-1076
  • Loading branch information
remy committed Apr 20, 2016
1 parent c04c9e5 commit f5856bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/protect/dedupe-patches.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ function dedupe(source) {

var other = acc[key];
if (other) {
debug('dupe found on %s & %s', vuln.id, other.id, key);
if (vuln.patches.modificationTime > other.patches.modificationTime) {
debug('dupe found on %s & %s', vuln.id, other.id);
if (vuln.publicationTime > other.publicationTime) {
debug('stripping %s', other.id);
removed.push(other);
acc[key] = vuln;
Expand Down

0 comments on commit f5856bf

Please sign in to comment.