Skip to content

Commit 1632ba9

Browse files
committed
MAGETWO-90539: Fixed Tax doesn't show in any total or tax field of cart during checkout.
1 parent 827d2d4 commit 1632ba9

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

app/code/Magento/Checkout/view/frontend/web/js/model/new-customer-address.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,23 @@ define([
1717
*/
1818
return function (addressData) {
1919
var identifier = Date.now(),
20+
countryId = addressData['country_id'] || addressData.countryId || window.checkoutConfig.defaultCountryId,
2021
regionId;
2122

2223
if (addressData.region && addressData.region['region_id']) {
2324
regionId = addressData.region['region_id'];
24-
} else if (addressData['country_id'] && addressData['country_id'] == window.checkoutConfig.defaultCountryId) { //eslint-disable-line
25+
} else if (
26+
/* eslint-disable */
27+
addressData['country_id'] && addressData['country_id'] == window.checkoutConfig.defaultCountryId ||
28+
!addressData['country_id'] && countryId == window.checkoutConfig.defaultCountryId
29+
/* eslint-enable */
30+
) {
2531
regionId = window.checkoutConfig.defaultRegionId || undefined;
2632
}
2733

2834
return {
2935
email: addressData.email,
30-
countryId: addressData['country_id'] || addressData.countryId || window.checkoutConfig.defaultCountryId,
36+
countryId: countryId,
3137
regionId: regionId || addressData.regionId,
3238
regionCode: addressData.region ? addressData.region['region_code'] : null,
3339
region: addressData.region ? addressData.region.region : null,

0 commit comments

Comments
 (0)