Skip to content

Commit 34384b7

Browse files
committed
The repeat check for New Password is performed only when New Password is entered.
This would make the current password less mandatory and allow the email change logic to work. fix #3193
1 parent 88b97b2 commit 34384b7

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)