diff --git a/lib/validate.js b/lib/validate.js index 5131a3ab..a95d708f 100644 --- a/lib/validate.js +++ b/lib/validate.js @@ -72,6 +72,7 @@ addMethod(string, 'ws', function (schemas, msg = 'invalid websocket') { name: 'ws', message: msg, test: value => { + if (!value) return true try { // eslint-disable-next-line no-new new URL(value)