diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2022-04-13 13:08:39 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2022-04-13 13:08:39 -0300 |
commit | b92ae8f64526246142dce51a5af441cbd6319e21 (patch) | |
tree | b8f21d903f9ada227731cd54dd5470d6880aa99d /src/util | |
parent | e8d048b093021630b71b38095b1375d464a93571 (diff) |
fix bugs from using old dateAdded property
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/wiki-data.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util/wiki-data.js b/src/util/wiki-data.js index 76018313..545e21e5 100644 --- a/src/util/wiki-data.js +++ b/src/util/wiki-data.js @@ -183,8 +183,8 @@ export function getNewAdditions(numAlbums, {wikiData}) { // are usually at the start of the final output for a given d8 of release // too). const sortedAlbums = albumData.filter(album => album.isListedOnHomepage).sort((a, b) => { - if (a.dateAdded > b.dateAdded) return -1; - if (a.dateAdded < b.dateAdded) return 1; + if (a.dateAddedToWiki > b.dateAddedToWiki) return -1; + if (a.dateAddedToWiki < b.dateAddedToWiki) return 1; if (a.isMajorRelease && !b.isMajorRelease) return -1; if (!a.isMajorRelease && b.isMajorRelease) return 1; if (a.date > b.date) return -1; @@ -218,10 +218,10 @@ export function getNewAdditions(numAlbums, {wikiData}) { // time we access one of its entries. This is 8asically unnecessary // since this will never 8e an expensive enough task for that to // matter.... 8ut it's nicer code. BBBB) ) - const currentDate = sortedAlbums[i].dateAdded; + const currentDate = sortedAlbums[i].dateAddedToWiki; const groupMap = new Map(); const groupArray = []; - for (let album; (album = sortedAlbums[i]) && +album.dateAdded === +currentDate; i++) { + for (let album; (album = sortedAlbums[i]) && +album.dateAddedToWiki === +currentDate; i++) { const primaryGroup = album.groups[0]; if (groupMap.has(primaryGroup)) { groupMap.get(primaryGroup).push(album); |