Skip to content

Commit ca58abd

Browse files
authored
Merge pull request #3194 from shibomb/fix/passwordrepeatcheck-when-enternewpassword
The repeat check for New Password is performed only when entered
2 parents 698ced5 + 2ec5c10 commit ca58abd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

client/utils/reduxFormUtils.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ export function validateSettings(formProps) {
5151
if (formProps.newPassword && formProps.newPassword.length < 6) {
5252
errors.newPassword = i18n.t('ReduxFormUtils.errorShortPassword');
5353
}
54-
if (formProps.currentPassword === formProps.newPassword) {
54+
if (
55+
formProps.newPassword &&
56+
formProps.currentPassword === formProps.newPassword
57+
) {
5558
errors.newPassword = i18n.t('ReduxFormUtils.errorNewPasswordRepeat');
5659
}
5760
return errors;

0 commit comments

Comments
 (0)