« get me outta code hell

upd8: don't crash when artistData fails to load - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-05-06 10:03:06 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-05-06 10:03:06 -0300
commit6ef934d9941f049c256832249816bb8a970121fb (patch)
tree5dd6aafa516c2a7db7421f8f1285e829ff0bac63 /src
parentf502e207d46aea02779d6b860491c303f35911fd (diff)
upd8: don't crash when artistData fails to load
Diffstat (limited to 'src')
-rwxr-xr-xsrc/upd8.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/upd8.js b/src/upd8.js
index 9b1f5412..e1115907 100755
--- a/src/upd8.js
+++ b/src/upd8.js
@@ -1107,7 +1107,11 @@ async function main() {
       logInfo`Loaded data and processed objects:`;
       logThings('albumData', 'albums');
       logThings('trackData', 'tracks');
-      logThings(wikiData.artistData.filter(artist => !artist.isAlias), 'artists');
+      logThings(
+        (wikiData.artistData
+          ? wikiData.artistData.filter(artist => !artist.isAlias)
+          : null),
+        'artists');
       if (wikiData.flashData) {
         logThings('flashData', 'flashes');
         logThings('flashActData', 'flash acts');