Skip to content

Commit 2165937

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-81818' into 2.2-develop-pr47
2 parents f31f70d + 9cf0d87 commit 2165937

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ define([
199199
privateContent = $.cookieStorage.get(privateContentVersion),
200200
localPrivateContent = $.localStorage.get(privateContentVersion),
201201
needVersion = 'need_version',
202-
expiredSectionNames = this.getExpiredSectionNames();
202+
expiredSectionNames = this.getExpiredSectionNames(),
203+
isLoading = false;
203204

204205
if (privateContent &&
205206
!$.cookieStorage.isSet(privateContentVersion) &&
@@ -208,13 +209,15 @@ define([
208209
$.cookieStorage.set(privateContentVersion, needVersion);
209210
$.localStorage.set(privateContentVersion, needVersion);
210211
this.reload([], false);
212+
isLoading = true;
211213
} else if (localPrivateContent !== privateContent) {
212214
if (!$.cookieStorage.isSet(privateContentVersion)) {
213215
privateContent = needVersion;
214216
$.cookieStorage.set(privateContentVersion, privateContent);
215217
}
216218
$.localStorage.set(privateContentVersion, privateContent);
217219
this.reload([], false);
220+
isLoading = true;
218221
} else if (expiredSectionNames.length > 0) {
219222
_.each(dataProvider.getFromStorage(storage.keys()), function (sectionData, sectionName) {
220223
buffer.notify(sectionName, sectionData);
@@ -233,7 +236,7 @@ define([
233236
if (!_.isEmpty(privateContent)) {
234237
countryData = this.get('directory-data');
235238

236-
if (_.isEmpty(countryData())) {
239+
if (_.isEmpty(countryData()) && !isLoading) {
237240
customerData.reload(['directory-data'], false);
238241
}
239242
}

0 commit comments

Comments
 (0)