diff options
-rw-r--r-- | src/listing-spec.js | 6 | ||||
-rw-r--r-- | src/util/wiki-data.js | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/listing-spec.js b/src/listing-spec.js index 97c1ef4a..334ea7f4 100644 --- a/src/listing-spec.js +++ b/src/listing-spec.js @@ -88,9 +88,9 @@ const listingSpec = [ data({wikiData}) { return chunkByProperties(wikiData.albumData.slice().sort((a, b) => { - if (a.dateAdded < b.dateAdded) return -1; - if (a.dateAdded > b.dateAdded) return 1; - }), ['dateAdded']); + if (a.dateAddedToWiki < b.dateAddedToWiki) return -1; + if (a.dateAddedToWiki > b.dateAddedToWiki) return 1; + }), ['dateAddedToWiki']); }, html(chunks, {link, strings}) { 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); |