File tree 1 file changed +5
-1
lines changed
app/code/Magento/Customer/view/frontend/web/js 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ define([
31
31
this . options . cache . label = $ ( this . options . passwordStrengthMeterLabelSelector , this . element ) ;
32
32
33
33
// We need to look outside the module for backward compatibility, since someone can already use the module.
34
+ // @todo Narrow this selector in 2.3 so it doesn't accidentally finds the the email field from the newsletter
35
+ // email field or any other "email" field.
34
36
this . options . cache . email = $ ( this . options . formSelector ) . find ( this . options . emailSelector ) ;
35
37
this . _bind ( ) ;
36
38
} ,
@@ -74,7 +76,9 @@ define([
74
76
'password-not-equal-to-user-name' : this . options . cache . email . val ( )
75
77
} ) ;
76
78
77
- if ( password . toLowerCase ( ) === this . options . cache . email . val ( ) . toLowerCase ( ) ) {
79
+ // We should only perform this check in case there is an email field on screen
80
+ if ( this . options . cache . email . length &&
81
+ password . toLowerCase ( ) === this . options . cache . email . val ( ) . toLowerCase ( ) ) {
78
82
displayScore = 1 ;
79
83
} else {
80
84
isValid = $ . validator . validateSingleElement ( this . options . cache . input ) ;
You can’t perform that action at this time.
0 commit comments