Skip to content

Commit

Permalink
refactor: highestUpdate -> update
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Feb 12, 2021
1 parent f6b4385 commit 55afac8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/workers/repository/process/lookup/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,13 +371,11 @@ export async function lookupUpdates(
const sortedUpdates = updates.sort((u1, u2) =>
version.sortVersions(u1.toVersion, u2.toVersion)
);
const highestUpdate = sortedUpdates.pop();
const update = sortedUpdates.pop();
if (sortedUpdates.length) {
highestUpdate.skippedOverVersions = sortedUpdates.map(
(u) => u.toVersion
);
update.skippedOverVersions = sortedUpdates.map((u) => u.toVersion);
}
res.updates.push(highestUpdate);
res.updates.push(update);
}
} else if (!currentValue) {
res.skipReason = SkipReason.UnsupportedValue;
Expand Down

0 comments on commit 55afac8

Please sign in to comment.