« get me outta code hell

upd8: handle empty additional file entries - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-04-07 12:03:28 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-04-07 12:03:55 -0300
commit4b4b38c9f466265e8ee07f5cac0b961ba990811d (patch)
tree4f85274bffa5499d1b9f3c849002aad5d3ef719b
parent46f62d621edc325c593981b4f8ef44d0bcadca88 (diff)
upd8: handle empty additional file entries
-rwxr-xr-xsrc/upd8.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/upd8.js b/src/upd8.js
index 66765f1d..6bd52da9 100755
--- a/src/upd8.js
+++ b/src/upd8.js
@@ -1685,7 +1685,7 @@ async function main() {
             ...(track.midiProjectFiles ?? []),
           ]),
         ]
-          .flatMap((fileGroup) => fileGroup.files)
+          .flatMap((fileGroup) => fileGroup.files ?? [])
           .map((file) => ({
             device: path.join(
               mediaPath,