Skip to content

Commit c039f45

Browse files
committed
static test failure fix
1 parent 3c57706 commit c039f45

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,24 @@ define([
7979
$(function () {
8080
trySync();
8181
setTimeout(trySync, 300);
82+
8283
// Observe changes in totals area to re-check once
8384
const totals = document.getElementById('cart-totals');
85+
8486
if (totals && typeof MutationObserver !== 'undefined') {
85-
const obs = new MutationObserver(
86-
function () {
87+
const obs = new MutationObserver(function () {
8788
trySync();
89+
8890
if (clicked) {
8991
obs.disconnect();
9092
}
9193
});
92-
obs.observe(totals, { childList: true, subtree: true, characterData: true });
94+
95+
obs.observe(totals, {
96+
childList: true,
97+
subtree: true,
98+
characterData: true
99+
});
93100
}
94101
});
95102
};

0 commit comments

Comments
 (0)