Skip to content

Commit f3d7952

Browse files
MAGETWO-55115: [GitHub][IE]Checkout cart totals.js throws an error when estimating shipping
1 parent bf0bf18 commit f3d7952

File tree

1 file changed

+23
-26
lines changed
  • app/code/Magento/Checkout/view/frontend/web/js/view/cart

1 file changed

+23
-26
lines changed

app/code/Magento/Checkout/view/frontend/web/js/view/cart/totals.js

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,28 @@
22
* Copyright © 2016 Magento. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5-
define(
6-
[
7-
'uiComponent',
8-
'Magento_Checkout/js/model/totals',
9-
'Magento_Checkout/js/model/shipping-service'
10-
],
11-
function (Component, totalsService, shippingService) {
12-
'use strict';
5+
define([
6+
'jquery',
7+
'uiComponent',
8+
'Magento_Checkout/js/model/totals',
9+
'Magento_Checkout/js/model/shipping-service'
10+
], function ($, Component, totalsService, shippingService) {
11+
'use strict';
1312

14-
return Component.extend({
13+
return Component.extend({
14+
isLoading: totalsService.isLoading,
1515

16-
isLoading: totalsService.isLoading,
17-
18-
/**
19-
* @override
20-
*/
21-
initialize: function () {
22-
this._super();
23-
totalsService.totals.subscribe(function () {
24-
window.dispatchEvent(new Event('resize'));
25-
});
26-
shippingService.getShippingRates().subscribe(function () {
27-
window.dispatchEvent(new Event('resize'));
28-
});
29-
}
30-
});
31-
}
32-
);
16+
/**
17+
* @override
18+
*/
19+
initialize: function () {
20+
this._super();
21+
totalsService.totals.subscribe(function () {
22+
$(window).trigger('resize');
23+
});
24+
shippingService.getShippingRates().subscribe(function () {
25+
$(window).trigger('resize');
26+
});
27+
}
28+
});
29+
});

0 commit comments

Comments
 (0)