diff options
Diffstat (limited to 'src/pages/shop/cart.js')
| -rw-r--r-- | src/pages/shop/cart.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pages/shop/cart.js b/src/pages/shop/cart.js index 90059d9a..4c954960 100644 --- a/src/pages/shop/cart.js +++ b/src/pages/shop/cart.js @@ -60,8 +60,8 @@ export default function Cart({ previousRoute }) { to_process: false })); setProducts(dataProducts); - setIsLoadingProducts(false); } + setIsLoadingProducts(false); } useEffect(() => { @@ -98,6 +98,10 @@ export default function Cart({ previousRoute }) { const blurQuantity = (productId, quantity) => { quantity = quantity == ('' || 0) ? 1 : parseInt(quantity); + if (typeof quantity === 'number') { + quantity = parseInt(quantity); + quantity = Math.floor(quantity); + } updateCart(productId, quantity); }; |
