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}?`