X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fcustom-validators%2Fusers.ts;h=d6e91ad35df62351fe66720caf8c3b7b977ba030;hb=e62f03ae0412f4efa62917d8741bc1a39e8ed7fc;hp=1ddbe08153c6ff278108c11e43f15cb2078647b4;hpb=4c1c17093461b58d3ee3f23f239e340d8dac1149;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/helpers/custom-validators/users.ts b/server/helpers/custom-validators/users.ts index 1ddbe0815..d6e91ad35 100644 --- a/server/helpers/custom-validators/users.ts +++ b/server/helpers/custom-validators/users.ts @@ -46,7 +46,7 @@ function isUserEmailVerifiedValid (value: any) { const nsfwPolicies = values(NSFW_POLICY_TYPES) function isUserNSFWPolicyValid (value: any) { - return exists(value) && nsfwPolicies.indexOf(value) !== -1 + return exists(value) && nsfwPolicies.includes(value) } function isUserWebTorrentEnabledValid (value: any) {