From 45923cad4030a4f890a2780f05f7b4a4353d3229 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 27 Feb 2022 21:04:29 -0400 Subject: move artistAliasData gen into artist data save() --- src/upd8.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src') 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(); -- cgit 1.3.0-6-gf8a5