From e8c75b1276fbc54242e134922db11ffd222d47d0 Mon Sep 17 00:00:00 2001 From: Nico Date: Mon, 24 Nov 2025 19:15:26 -0800 Subject: [PATCH] Fix item quantity increase --- frontend/src/pages/GroceryList.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/GroceryList.jsx b/frontend/src/pages/GroceryList.jsx index 78c4f96..0f3a23c 100644 --- a/frontend/src/pages/GroceryList.jsx +++ b/frontend/src/pages/GroceryList.jsx @@ -72,7 +72,8 @@ export default function GroceryList() { let newQuantity = quantity; const item = await getItemByName(itemName); - if (item.data && item.data.item_bought === false) { + if (item.data && item.data.bought === false) { + console.log("Item exists:", item.data); let currentQuantity = item.data.quantity; const yes = window.confirm( `Item "${itemName}" already exists in the list. Do you want to update its quantity from ${currentQuantity} to ${currentQuantity + newQuantity}?`