Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rushtong committed Oct 20, 2023
1 parent ef2de93 commit b0e4e7d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/data_submission/RegistrationValidation.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ export const compileSchema = (schema) => {
.addFormat('uri', urlValidator.isValid)
.addFormat('email', emailValidator.isValid);

// Ajv doesn't like the `$schema` and `version` properties
// Ajv doesn't like the `$schema` and `version` properties so we destructure them away
// eslint-disable-next-line no-unused-vars
const {$schema, version, ...obj} = schema;
return ajv.compile(obj);
const {$schema, version, ...filteredSchema} = schema;
return ajv.compile(filteredSchema);
};

/**
Expand Down

0 comments on commit b0e4e7d

Please sign in to comment.