« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/upd8.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/upd8.js b/src/upd8.js
index eb2da684..9c218d41 100755
--- a/src/upd8.js
+++ b/src/upd8.js
@@ -2423,6 +2423,18 @@ async function main() {
 
             save(results) {
                 wikiData.artistData = results;
+
+                wikiData.artistAliasData = results.flatMap(artist => {
+                    const origRef = Thing.getReference(artist);
+                    return (artist.aliasNames?.map(name => {
+                        const alias = new Artist();
+                        alias.name = name;
+                        alias.isAlias = true;
+                        alias.aliasedArtistRef = origRef;
+                        alias.artistData = WD.artistData;
+                        return alias;
+                    }) ?? []);
+                });
             }
         },
 
@@ -2935,18 +2947,6 @@ async function main() {
     // appropriate.
     linkDataArrays();
 
-    WD.artistAliasData = wikiData.artistData.flatMap(artist => {
-        const origRef = Thing.getReference(artist);
-        return (artist.aliasNames?.map(name => {
-            const alias = new Artist();
-            alias.name = name;
-            alias.isAlias = true;
-            alias.aliasedArtistRef = origRef;
-            alias.artistData = WD.artistData;
-            return alias;
-        }) ?? []);
-    });
-
     // Filter out any reference errors throughout the data, warning about them
     // too.
     filterAndShowReferenceErrors();