diff --git a/src/features/product/ui/Product.tsx b/src/features/product/ui/Product.tsx index 925e082..01c9224 100644 --- a/src/features/product/ui/Product.tsx +++ b/src/features/product/ui/Product.tsx @@ -199,12 +199,12 @@ const ProductDetail = () => { const handleDecrease = () => { setQuantity((q) => { - const base = q === '' || q === '.' || q === ',' ? 0 : Number(q); + const base = q === '' || q === '.' || q === ',' ? MIN_QTY : Number(q); let next = base - STEP; if (isGram) next = Math.floor(next / STEP) * STEP; - return next <= MIN_QTY ? MIN_QTY : next; + return Math.max(next, MIN_QTY); }); }; @@ -256,7 +256,8 @@ const ProductDetail = () => {