Skip to content

Commit 398ecd5

Browse files
author
Korshenko, Olexii(okorshenko)
committed
Merge pull request #310 from magento-south/MAGETWO-46891-2.0
[SOUTH] Bug
2 parents ee8ba2a + ca03c88 commit 398ecd5

File tree

5 files changed

+13
-14
lines changed

5 files changed

+13
-14
lines changed

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ define(
1212
function($, address, customerData, mageUtils) {
1313
'use strict';
1414
var countryData = customerData.get('directory-data');
15-
if (_.isEmpty(countryData())) {
16-
countryData(customerData.reload(['directory-data'], false));
17-
}
1815

1916
return {
2017
/**

app/code/Magento/Checkout/view/frontend/web/js/view/billing-address.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ define(
5050
});
5151
addressOptions.push(newAddressOption);
5252

53-
if (_.isEmpty(countryData())) {
54-
countryData(customerData.reload(['directory-data'], false));
55-
}
56-
5753
return Component.extend({
5854
defaults: {
5955
template: 'Magento_Checkout/billing-address'

app/code/Magento/Checkout/view/frontend/web/js/view/shipping-address/address-renderer/default.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ define([
1515
], function($, ko, Component, selectShippingAddressAction, quote, formPopUpState, checkoutData, customerData) {
1616
'use strict';
1717
var countryData = customerData.get('directory-data');
18-
if (_.isEmpty(countryData())) {
19-
countryData(customerData.reload(['directory-data'], false));
20-
}
2118

2219
return Component.extend({
2320
defaults: {

app/code/Magento/Checkout/view/frontend/web/js/view/shipping-information/address-renderer/default.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ define([
99
], function(Component, customerData) {
1010
'use strict';
1111
var countryData = customerData.get('directory-data');
12-
if (_.isEmpty(countryData())) {
13-
countryData(customerData.reload(['directory-data'], false));
14-
}
1512

1613
return Component.extend({
1714
defaults: {

app/code/Magento/Customer/view/frontend/web/js/customer-data.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,13 @@ define([
104104

105105
var customerData = {
106106
init: function() {
107+
var countryData,
108+
privateContent = $.cookieStorage.get('private_content_version');
109+
107110
if (_.isEmpty(storage.keys())) {
108-
this.reload([], false);
111+
if (!_.isEmpty(privateContent)) {
112+
this.reload([], false);
113+
}
109114
} else if (this.needReload()) {
110115
_.each(dataProvider.getFromStorage(storage.keys()), function (sectionData, sectionName) {
111116
buffer.notify(sectionName, sectionData);
@@ -119,6 +124,13 @@ define([
119124
this.reload(storageInvalidation.keys(), false);
120125
}
121126
}
127+
128+
if (!_.isEmpty(privateContent)) {
129+
countryData = this.get('directory-data');
130+
if (_.isEmpty(countryData())) {
131+
countryData(customerData.reload(['directory-data'], false));
132+
}
133+
}
122134
},
123135
needReload: function () {
124136
var cookieSections = $.cookieStorage.get('section_data_ids');

0 commit comments

Comments
 (0)