X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fcustom-validators%2Fmisc.ts;h=cf32201c411a6532e6c002c88282b699657ddee7;hb=de6310b2fcbb8a6b79c546b23dfa1920724faaa7;hp=89149b3e0a0cf91af9d589e0350aec2ddd7436d3;hpb=7cde3b9c2e84ea20bb0aae4544598483cde9e22c;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/helpers/custom-validators/misc.ts b/server/helpers/custom-validators/misc.ts index 89149b3e0..cf32201c4 100644 --- a/server/helpers/custom-validators/misc.ts +++ b/server/helpers/custom-validators/misc.ts @@ -94,13 +94,13 @@ function isFileValid ( if (isArray(files)) return optional // Should have a file - const fileArray = files[ field ] + const fileArray = files[field] if (!fileArray || fileArray.length === 0) { return optional } // The file should exist - const file = fileArray[ 0 ] + const file = fileArray[0] if (!file || !file.originalname) return false // Check size