diff options
Diffstat (limited to 'src/content')
-rw-r--r-- | src/content/dependencies/generateArtistInfoPage.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/content/dependencies/generateArtistInfoPage.js b/src/content/dependencies/generateArtistInfoPage.js index 9c2eecc8..5ec2fe15 100644 --- a/src/content/dependencies/generateArtistInfoPage.js +++ b/src/content/dependencies/generateArtistInfoPage.js @@ -64,19 +64,19 @@ export default { sortFunction(things); const outputArrays = []; - const thingToOutputArray = []; + const thingToOutputArray = new Map(); for (const thing of things) { const array = []; - thingToOutputArray[thing] = array; + thingToOutputArray.set(thing, array); outputArrays.push(array); } for (const entry of entries) { - thingToOutputArray[entry.thing].push(entry); + thingToOutputArray.get(entry.thing).push(entry); } - return outputArrays.flat(); + entries.splice(0, entries.length, ...outputArrays.flat()); }; // TODO: Add and integrate wallpaper and banner date fields (#90) |