diff --git a/lib/validate.js b/lib/validate.js index 1baa31c9..446b1731 100644 --- a/lib/validate.js +++ b/lib/validate.js @@ -159,6 +159,7 @@ const hexOrBase64Validator = string().test({ name: 'hex-or-base64', message: 'invalid encoding', test: (val) => { + if (typeof val === 'undefined') return true try { ensureB64(val) return true