File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
app/code/Magento/Customer/view/frontend/web/js Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ define([
3131 this . options . cache . label = $ ( this . options . passwordStrengthMeterLabelSelector , this . element ) ;
3232
3333 // 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
35+ // newsletter email field or any other "email" field.
3436 this . options . cache . email = $ ( this . options . formSelector ) . find ( this . options . emailSelector ) ;
3537 this . _bind ( ) ;
3638 } ,
@@ -74,7 +76,9 @@ define([
7476 'password-not-equal-to-user-name' : this . options . cache . email . val ( )
7577 } ) ;
7678
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 ( ) ) {
7882 displayScore = 1 ;
7983 } else {
8084 isValid = $ . validator . validateSingleElement ( this . options . cache . input ) ;
You can’t perform that action at this time.
0 commit comments