Skip to content

Commit 92beb62

Browse files
author
Dmytro Voskoboinikov
committed
MAGETWO-57771: Log-in button does not appear after entering email then leaving checkout page
1 parent d729540 commit 92beb62

File tree

1 file changed

+8
-10
lines changed
  • app/code/Magento/Checkout/view/frontend/web/js/view/form/element

1 file changed

+8
-10
lines changed

app/code/Magento/Checkout/view/frontend/web/js/view/form/element/email.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -94,21 +94,19 @@ define([
9494
* Check email existing.
9595
*/
9696
checkEmailAvailability: function () {
97-
var self = this;
98-
9997
this.validateRequest();
10098
this.isEmailCheckComplete = $.Deferred();
10199
this.isLoading(true);
102100
this.checkRequest = checkEmailAvailability(this.isEmailCheckComplete, this.email());
103101

104102
$.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));
112110
},
113111

114112
/**
@@ -175,7 +173,7 @@ define([
175173
* @returns {Boolean} - initial visibility state.
176174
*/
177175
resolveInitialPasswordVisibility: function () {
178-
if (checkoutData.getInputFieldEmailValue() != '') {
176+
if (checkoutData.getInputFieldEmailValue() !== '') {
179177
return (checkoutData.getInputFieldEmailValue() == checkoutData.getCheckedEmailValue())
180178
}
181179

0 commit comments

Comments
 (0)