We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 689e99e commit d37d0fdCopy full SHA for d37d0fd
app/code/Magento/Checkout/view/frontend/web/js/view/minicart.js
@@ -12,6 +12,7 @@ define([
12
'use strict';
13
14
var sidebarInitialized = false;
15
+ var addToCartCalls = 0;
16
url.setBaseUrl(window.checkout.baseUrl);
17
18
function initSidebar() {
@@ -61,10 +62,12 @@ define([
61
62
this._super();
63
this.cart = customerData.get('cart');
64
this.cart.subscribe(function () {
- this.isLoading(false);
65
+ addToCartCalls--;
66
+ this.isLoading(addToCartCalls > 0);
67
sidebarInitialized = false;
68
}, this);
69
$('[data-block="minicart"]').on('contentLoading', function(event) {
70
+ addToCartCalls++;
71
self.isLoading(true);
72
});
73
},
0 commit comments