diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2022-02-27 21:04:29 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2022-02-27 21:04:29 -0400 |
commit | 45923cad4030a4f890a2780f05f7b4a4353d3229 (patch) | |
tree | c251252849deae6de34b08f2fb4985e17c2535d1 /src | |
parent | 33c607bbdc8211cd32232bf50cdcf7eafbaf48a7 (diff) |
move artistAliasData gen into artist data save()
Diffstat (limited to 'src')
-rwxr-xr-x | src/upd8.js | 24 |
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(); |