diff options
Diffstat (limited to 'src/content/dependencies')
-rw-r--r-- | src/content/dependencies/generateAlbumAdditionalFilesList.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/content/dependencies/generateAlbumAdditionalFilesList.js b/src/content/dependencies/generateAlbumAdditionalFilesList.js index 3ab0e27a..b9269d74 100644 --- a/src/content/dependencies/generateAlbumAdditionalFilesList.js +++ b/src/content/dependencies/generateAlbumAdditionalFilesList.js @@ -20,13 +20,15 @@ export default { chunkItems: additionalFiles - .map(({files}) => files - .map(() => relation('generateAdditionalFilesListChunkItem'))), + .map(({files}) => + (files ?? []) + .map(() => relation('generateAdditionalFilesListChunkItem'))), chunkItemFileLinks: additionalFiles - .map(({files}) => files - .map(file => relation('linkAlbumAdditionalFile', album, file))), + .map(({files}) => + (files ?? []) + .map(file => relation('linkAlbumAdditionalFile', album, file))), }), data: (album, additionalFiles) => ({ @@ -38,11 +40,11 @@ export default { chunkDescriptions: additionalFiles - .map(({description}) => description), + .map(({description}) => description ?? null), chunkItemLocations: additionalFiles - .map(({files}) => files), + .map(({files}) => files ?? []), }), slots: { |