Don't delete confirmed password from formik object

If the save fails, the form will attempt to reload the
deleted value.
This commit is contained in:
Jake McDermott
2020-03-24 12:21:07 -04:00
parent d941f11ccd
commit b56812018a

View File

@@ -145,8 +145,8 @@ function UserForm({ user, handleCancel, handleSubmit, submitError, i18n }) {
if (!values.password || values.password === '') {
delete values.password;
}
delete values.confirm_password;
handleSubmit(values);
const { confirm_password, ...submitValues } = values;
handleSubmit(submitValues);
}
};