Skip to content

Commit

Permalink
#13765 "cart" section data gets loaded 3 times on cart page (2.2.2):
Browse files Browse the repository at this point in the history
- Blank line after variable declarations was added;
- Blank line before "if" was added.
  • Loading branch information
Andrii Beziazychnyi authored and andrewbess committed Mar 24, 2018
1 parent d2c6bd0 commit 42350cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Expand Up @@ -23,6 +23,7 @@ define([
cartData.subscribe(function () {
var quoteSubtotal = parseFloat(quote.totals().subtotal),
subtotalAmount = parseFloat(cartData().subtotalAmount);

if (quoteSubtotal !== subtotalAmount) {
customerData.reload(['cart'], false);
}
Expand Down
Expand Up @@ -94,6 +94,7 @@ define([
this.isLoading(addToCartCalls > 0);
sidebarInitialized = false;
this.update(updatedCart);

if (cartData()['website_id'] !== window.checkout.websiteId) {
customerData.reload(['cart'], false);
}
Expand Down

0 comments on commit 42350cd

Please sign in to comment.