« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/dependencies')
-rw-r--r--src/content/dependencies/generateArtistInfoPage.js8
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)