Skip to content

Commit

Permalink
minicart js error fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
yudiz-ritikapatel committed May 31, 2024
1 parent 0823c37 commit 6e4aa3b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions view/frontend/web/js/view/minicart.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,12 @@ define([
* - Only triggers if the customer section is included in the reload
*/
updateMiniCart: function (event, sections) {
if (sections.includes('customer')) {
const sectionsToUpdate = ['cart'];
customerData.invalidate(sectionsToUpdate);
customerData.reload(sectionsToUpdate, true);
if (typeof sections !== 'undefined'){
if (sections.includes('cart')) {
const sectionsToUpdate = ['cart'];
customerData.invalidate(sectionsToUpdate);
customerData.reload(sectionsToUpdate, true);
}
}
},
});
Expand Down

0 comments on commit 6e4aa3b

Please sign in to comment.