Skip to content

Commit 5f73347

Browse files
committed
MC-19096: eliminate redundant check for directory-data inside customer data constructor
1 parent 9fa9149 commit 5f73347

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -239,14 +239,6 @@ define([
239239
this.reload(storageInvalidation.keys(), false);
240240
}
241241
}
242-
243-
if (!_.isEmpty(privateContent)) {
244-
countryData = this.get('directory-data');
245-
246-
if (_.isEmpty(countryData()) && !isLoading) {
247-
customerData.reload(['directory-data'], false);
248-
}
249-
}
250242
},
251243

252244
/**
@@ -332,6 +324,9 @@ define([
332324
},
333325

334326
/**
327+
* Avoid using this function directly 'cause of possible performance drawbacks.
328+
* Each customer section reload brings new non-cached ajax request
329+
*
335330
* @param {Array} sectionNames
336331
* @param {Boolean} forceNewSectionTimestamp
337332
* @return {*}

0 commit comments

Comments
 (0)