Skip to content

Commit ecb06c3

Browse files
authored
Move initializer outside of performance callback (#3736)
1 parent 4225095 commit ecb06c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

assets/cart.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ class CartItems extends HTMLElement {
160160
return response.text();
161161
})
162162
.then((state) => {
163+
const parsedState = JSON.parse(state);
163164

164165
CartPerformance.measure(`${eventTarget}:paint-updated-sections"`, () => {
165-
const parsedState = JSON.parse(state);
166166
const quantityElement =
167167
document.getElementById(`Quantity-${line}`) || document.getElementById(`Drawer-quantity-${line}`);
168168
const items = document.querySelectorAll('.cart-item');

0 commit comments

Comments
 (0)