Skip to content

Commit

Permalink
BP-2537 - prefilled email for customer users PPE
Browse files Browse the repository at this point in the history
  • Loading branch information
LucianTuriacArnia committed Aug 31, 2023
1 parent c7db298 commit 0780aee
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions view/frontend/web/js/view/payment/method-renderer/payperemail.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,22 +85,22 @@ define(
);
quote.billingAddress.subscribe(function (address) {
if(address !== null) {
this.firstName(address.firstname);
this.lastName(address.lastname);
this.middleName(address.middlename);
this.firstName(address.firstname || '');
this.lastName(address.lastname || '');
this.middleName(address.middlename || '');

this.updateState(
'buckaroo_magento2_payperemail_BillingFirstName',
address.firstname.length > 0
address.firstname && address.firstname.length > 0
);
this.updateState(
'buckaroo_magento2_payperemail_BillingLastName',
address.lastname.length > 0
address.lastname && address.lastname.length > 0
);
}
}, this);

if(customerData !== null) {
if (typeof customerData === 'object' && customerData.hasOwnProperty('email')) {
this.email(customerData.email);
this.updateState(
'buckaroo_magento2_payperemail_Email',
Expand Down

0 comments on commit 0780aee

Please sign in to comment.