From ab87ad30dc4594b256940aebbe074baa8c4c55a8 Mon Sep 17 00:00:00 2001 From: Gadi Cohen Date: Fri, 5 Feb 2021 18:53:20 +0200 Subject: [PATCH] fix(validate): show errors by default --- src/lib/validateAndCoerceTypes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/validateAndCoerceTypes.ts b/src/lib/validateAndCoerceTypes.ts index 40fbd215..c2ee407d 100644 --- a/src/lib/validateAndCoerceTypes.ts +++ b/src/lib/validateAndCoerceTypes.ts @@ -101,7 +101,7 @@ function validate(object: object, key: string, module?: string, options?: Valida if (!module) { - if (options?.logErrors) { + if (!options || options.logErrors === undefined || options.logErrors === true) { const title = encodeURIComponent("Failed validation: " + key); console.error("The following result did not validate with schema: " + key); logObj(validator.errors);