X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fcustom-validators%2Fservers.ts;h=c0f8b6aebb23219e86f0932ab13a0487822eb2a9;hb=4d029ef8ec3d5274eeaa3ee6d808eb7035e7faef;hp=7ced36fd3339ade18f54c6014ac5bb6d1151e3ef;hpb=c8861d5dc0436ef4342ce517241e3591fa256a13;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/helpers/custom-validators/servers.ts b/server/helpers/custom-validators/servers.ts index 7ced36fd3..c0f8b6aeb 100644 --- a/server/helpers/custom-validators/servers.ts +++ b/server/helpers/custom-validators/servers.ts @@ -1,4 +1,4 @@ -import * as validator from 'validator' +import validator from 'validator' import { exists, isArray } from './misc' import { isTestInstance } from '../core-utils' import { CONSTRAINTS_FIELDS } from '../../initializers/constants' @@ -19,7 +19,6 @@ function isHostValid (host: string) { function isEachUniqueHostValid (hosts: string[]) { return isArray(hosts) && - hosts.length !== 0 && hosts.every(host => { return isHostValid(host) && hosts.indexOf(host) === hosts.lastIndexOf(host) })