X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fcustom-validators%2Fvideos.ts;h=60e8075f6466ca0388d9151ec0624b167c27d1ac;hb=560605026bfadab711cf6d34e9c7ea865887816a;hp=cfb430c638485034a23dd0bdf1a2a4989a65ebac;hpb=134cf2bce96a8c5aefd55154e884964975d8cf23;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/helpers/custom-validators/videos.ts b/server/helpers/custom-validators/videos.ts index cfb430c63..60e8075f6 100644 --- a/server/helpers/custom-validators/videos.ts +++ b/server/helpers/custom-validators/videos.ts @@ -73,7 +73,7 @@ function isVideoViewsValid (value: string) { } function isVideoRatingTypeValid (value: string) { - return value === 'none' || values(VIDEO_RATE_TYPES).indexOf(value as VideoRateType) !== -1 + return value === 'none' || values(VIDEO_RATE_TYPES).includes(value as VideoRateType) } function isVideoFileExtnameValid (value: string) {