Skip to content

Commit

Permalink
refactor: bucketRelease
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Feb 13, 2021
1 parent 1acda01 commit 0e0308f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/workers/repository/process/lookup/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,8 @@ export async function lookupUpdates(
const sortedReleases = bucketReleases.sort((r1, r2) =>
versioning.sortVersions(r1.version, r2.version)
);
const release = sortedReleases.pop();
const toVersion = release.version;
const bucketRelease = sortedReleases.pop();
const toVersion = bucketRelease.version;
const update: LookupUpdate = { fromVersion, toVersion, newValue: null };
update.bucket = bucket;
try {
Expand Down Expand Up @@ -380,8 +380,8 @@ export async function lookupUpdates(
'releaseTimestamp',
];
releaseFields.forEach((field) => {
if (release[field] !== undefined) {
update[field] = release[field];
if (bucketRelease[field] !== undefined) {
update[field] = bucketRelease[field];
}
});
if (sortedReleases.length) {
Expand Down

0 comments on commit 0e0308f

Please sign in to comment.