Skip to content

Commit 84c1ebf

Browse files
committed
Fix static test failure
1 parent f4e5ff7 commit 84c1ebf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/code/Magento/Checkout/view/frontend/web/js/cart/ensure-subtotal-sync.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ define([
2222
}
2323
// Remove non-numeric except . , - then normalize
2424
let cleaned = ('' + text).replace(/[^0-9,.-]/g, '');
25+
2526
// If both , and . exist, assume , is thousands
2627
if (cleaned.indexOf(',') > -1 && cleaned.indexOf('.') > -1) {
2728
cleaned = cleaned.replace(/,/g, '');
@@ -30,6 +31,7 @@ define([
3031
cleaned = cleaned.replace(/,/g, '.');
3132
}
3233
const n = parseFloat(cleaned);
34+
3335
return isNaN(n) ? NaN : Math.round(n * 100) / 100;
3436
}
3537

@@ -60,7 +62,6 @@ define([
6062
const central = getCentralSubtotal(), summary = getSummarySubtotal();
6163
if (!isNaN(central) && !isNaN(summary) && central !== summary) {
6264
const $updateBtn = $root.find('.cart.main.actions button.action.update');
63-
6465
if ($updateBtn.length) {
6566
clicked = true;
6667
$updateBtn.trigger('click');

0 commit comments

Comments
 (0)