Skip to content

Commit

Permalink
rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Puczynski committed Feb 25, 2019
1 parent 2c2923e commit 6bbd64b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,19 +179,19 @@ export default function validateFormData(
formerMetaSchema = additionalMetaSchemas;
}

let validationErrors = null;
let validationError = null;
try {
ajv.validate(schema, formData);
} catch (err) {
validationErrors = err;
validationError = err;
}
let errors = transformAjvErrors(ajv.errors);

if (validationErrors && validationErrors.message) {
if (validationError && validationError.message) {
errors = [
...errors,
{
stack: validationErrors.message,
stack: validationError.message,
},
];
}
Expand Down

0 comments on commit 6bbd64b

Please sign in to comment.