From 0e2630ff2e829718a8ded6a1935e1dcbd4e200a7 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 3 Jun 2023 14:21:06 -0300 Subject: goddammit how did i even write this lol --- src/content/dependencies/generateArtistInfoPage.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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) -- cgit 1.3.0-6-gf8a5