Skip to content

Commit 24dfb62

Browse files
authored
Do not send an ajax request if there no affected sections
1 parent ad0ba79 commit 24dfb62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ define([
381381
if (settings.type.match(/post|put|delete/i)) {
382382
sections = sectionConfig.getAffectedSections(settings.url);
383383

384-
if (sections) {
384+
if (sections && sections.length) {
385385
customerData.invalidate(sections);
386386
redirects = ['redirect', 'backUrl'];
387387

0 commit comments

Comments
 (0)