summaryrefslogtreecommitdiff
path: root/src/lib/cart/components/Cart.jsx
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-03-27 17:03:28 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-03-27 17:03:28 +0700
commita040418bdddd5fcaf8a8d67e0a66ea92fd16ee24 (patch)
tree22be75fe02bf75dfafa7c82b0eef2187b186f86a /src/lib/cart/components/Cart.jsx
parent7ed2913450713655d2e962846d795dc6b4091de4 (diff)
-
Diffstat (limited to 'src/lib/cart/components/Cart.jsx')
-rw-r--r--src/lib/cart/components/Cart.jsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/cart/components/Cart.jsx b/src/lib/cart/components/Cart.jsx
index d646420c..7ebee14b 100644
--- a/src/lib/cart/components/Cart.jsx
+++ b/src/lib/cart/components/Cart.jsx
@@ -93,11 +93,11 @@ const Cart = () => {
quantity -= value
break
case 'BLUR':
- if (value != '') return
+ if (value != '' && value > 0) return
quantity = 1
break
default:
- quantity = value
+ quantity = value != '' && value < 1 ? 1 : value
break
}
productsToUpdate[productIndex].quantity = quantity