diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-06-03 14:21:06 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-06-03 14:21:06 -0300 |
commit | 0e2630ff2e829718a8ded6a1935e1dcbd4e200a7 (patch) | |
tree | 475736e81e570bfae3f2415bfd226a4fbb201527 /src/content/dependencies | |
parent | a6493da3ba7809dad4fd482936449e5649fa3a01 (diff) |
goddammit how did i even write this
lol
Diffstat (limited to 'src/content/dependencies')
-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) |