« get me outta code hell

validators: isAdditionalFile: make files optional - 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-04-02 17:14:36 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-04-02 17:14:36 -0300
commit224211c2e5d1fcfa0de0c1155f747b66dd597517 (patch)
tree67494ab35771358c3b1b8aae03086f481ccfad7a /src
parentbcb0b8ac37d7f256b2b4f82f3c245501486bd52e (diff)
validators: isAdditionalFile: make files optional
Diffstat (limited to 'src')
-rw-r--r--src/data/validators.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/data/validators.js b/src/data/validators.js
index d89c23bb..46dd292d 100644
--- a/src/data/validators.js
+++ b/src/data/validators.js
@@ -623,7 +623,7 @@ export const isContributionList = validateArrayItems(isContribution);
 export const isAdditionalFile = validateProperties({
   title: isName,
   description: optional(isContentString),
-  files: validateArrayItems(isString),
+  files: optional(validateArrayItems(isString)),
 });
 
 export const isAdditionalFileList = validateArrayItems(isAdditionalFile);