File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
app/code/Magento/Checkout/view/frontend/web/js/cart Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,13 @@ define([
1212 /**
1313 * Compare central cart subtotal with summary subtotal and click Update once if mismatched.
1414 */
15- return function initEnsureSubtotalSync ( config , element ) {
15+ return function initEnsureSubtotalSync ( config , element )
16+ {
1617 const $root = $ ( element || document ) ;
1718 let clicked = false ;
1819
19- function parsePrice ( text ) {
20+ function parsePrice ( text )
21+ {
2022 if ( ! text ) {
2123 return NaN ;
2224 }
@@ -35,7 +37,8 @@ define([
3537 return isNaN ( n ) ? NaN : Math . round ( n * 100 ) / 100 ;
3638 }
3739
38- function getCentralSubtotal ( ) {
40+ function getCentralSubtotal ( )
41+ {
3942 // Sum of row totals on the table
4043 let sum = 0 ;
4144
@@ -49,14 +52,16 @@ define([
4952 return Math . round ( sum * 100 ) / 100 ;
5053 }
5154
52- function getSummarySubtotal ( ) {
55+ function getSummarySubtotal ( )
56+ {
5357 // Summary subtotal in cart totals knockout template
5458 const text = $ ( '#cart-totals .totals.sub .amount .price' ) . first ( ) . text ( ) ;
5559
5660 return parsePrice ( text ) ;
5761 }
5862
59- function trySync ( ) {
63+ function trySync ( )
64+ {
6065 if ( clicked ) {
6166 return ;
6267 }
You can’t perform that action at this time.
0 commit comments