From a29ea685ede15faaec767ccc69b5793a2269d2e5 Mon Sep 17 00:00:00 2001 From: CalinR Date: Fri, 26 Jul 2024 11:45:43 -0500 Subject: [PATCH] Fixes issue with isAddressSameAsShipping not being defined in Aheadworks one page checkout --- view/frontend/web/js/model/address.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/view/frontend/web/js/model/address.js b/view/frontend/web/js/model/address.js index 31688237..7246993d 100644 --- a/view/frontend/web/js/model/address.js +++ b/view/frontend/web/js/model/address.js @@ -42,7 +42,7 @@ define([ } const billing = registry.get('index = billingAddress'); if (!street1) { - const street1Field = billing && billing.isAddressSameAsShipping() + const street1Field = billing && billing.isAddressSameAsShipping && billing.isAddressSameAsShipping() ? registry.get('dataScope = shippingAddress.street.0') : registry.get('dataScope = billingAddress.street.0'); if (street1Field) { @@ -50,7 +50,7 @@ define([ } } if (!street2) { - const street2Field = billing && billing.isAddressSameAsShipping() + const street2Field = billing && billing.isAddressSameAsShipping && billing.isAddressSameAsShipping() ? registry.get('dataScope = shippingAddress.street.1') : registry.get('dataScope = billingAddress.street.1'); if (street2Field) {