Skip to content

Commit

Permalink
fix(validate): show errors by default
Browse files Browse the repository at this point in the history
  • Loading branch information
gadicc committed Feb 5, 2021
1 parent a439e7d commit ab87ad3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/validateAndCoerceTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ab87ad3

Please sign in to comment.