Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.

Commit

Permalink
YSHOP2-983: fix spinner not showing on product page with variants (#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
eihabkhan1 authored Oct 19, 2023
1 parent df6dba2 commit 2605e2c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion assets/add-to-cart.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ async function addToCart(snippetId) {
}

try {
load('#loading__cart');
requestAnimationFrame(() => {
load('#loading__cart');
})

const response = await youcanjs.cart.addItem({
productVariantId: variantId,
Expand Down

0 comments on commit 2605e2c

Please sign in to comment.