Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getNewErrors(errors, schema, errorMessage) {
if (errorMessage) {
return addError(errors, schema, errorMessage);
} else if (getError(errors, schema) !== undefined) {
return removeError(errors, schema);
}
return errors;
}
function getNewErrors(errors, schema, errorMessage) {
if (errorMessage) {
return addError(errors, schema, errorMessage);
} else if (getError(errors, schema) !== undefined) {
return removeError(errors, schema);
}
return errors;
}
function getNewErrors(errors, schema, errorMessage) {
if (errorMessage) {
return addError(errors, schema, errorMessage);
} else if (getError(errors, schema) !== undefined) {
return removeError(errors, schema);
}
return errors;
}