File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
app/code/Magento/Checkout/view/frontend/web/js/view/form/element Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -94,21 +94,19 @@ define([
94
94
* Check email existing.
95
95
*/
96
96
checkEmailAvailability : function ( ) {
97
- var self = this ;
98
-
99
97
this . validateRequest ( ) ;
100
98
this . isEmailCheckComplete = $ . Deferred ( ) ;
101
99
this . isLoading ( true ) ;
102
100
this . checkRequest = checkEmailAvailability ( this . isEmailCheckComplete , this . email ( ) ) ;
103
101
104
102
$ . when ( this . isEmailCheckComplete ) . done ( function ( ) {
105
- self . isPasswordVisible ( false ) ;
106
- } ) . fail ( function ( ) {
107
- self . isPasswordVisible ( true ) ;
108
- checkoutData . setCheckedEmailValue ( self . email ( ) ) ;
109
- } ) . always ( function ( ) {
110
- self . isLoading ( false ) ;
111
- } ) ;
103
+ this . isPasswordVisible ( false ) ;
104
+ } . bind ( this ) ) . fail ( function ( ) {
105
+ this . isPasswordVisible ( true ) ;
106
+ checkoutData . setCheckedEmailValue ( this . email ( ) ) ;
107
+ } . bind ( this ) ) . always ( function ( ) {
108
+ this . isLoading ( false ) ;
109
+ } . bind ( this ) ) ;
112
110
} ,
113
111
114
112
/**
@@ -175,7 +173,7 @@ define([
175
173
* @returns {Boolean } - initial visibility state.
176
174
*/
177
175
resolveInitialPasswordVisibility : function ( ) {
178
- if ( checkoutData . getInputFieldEmailValue ( ) != '' ) {
176
+ if ( checkoutData . getInputFieldEmailValue ( ) !== '' ) {
179
177
return ( checkoutData . getInputFieldEmailValue ( ) == checkoutData . getCheckedEmailValue ( ) )
180
178
}
181
179
You can’t perform that action at this time.
0 commit comments