Fixed date bug.

This commit is contained in:
ThePendulum 2019-11-19 04:41:56 +01:00
parent 3ec7b15886
commit a13d92b84e
1 changed files with 1 additions and 1 deletions

View File

@ -31,12 +31,12 @@ async function findDuplicateReleaseIds(latestReleases, accReleases) {
async function scrapeUniqueReleases(scraper, site, afterDate = getAfterDate(), accReleases = [], page = 1) {
const latestReleases = await scraper.fetchLatest(site, page);
const oldestReleaseOnPage = latestReleases.slice(-1)[0].date;
if (latestReleases.length === 0) {
return [];
}
const oldestReleaseOnPage = latestReleases.slice(-1)[0].date;
const duplicateReleaseIds = argv.redownload ? new Set() : await findDuplicateReleaseIds(latestReleases, accReleases);
const uniqueReleases = latestReleases