diff --git a/frontend/src/pages/GroceryList.jsx b/frontend/src/pages/GroceryList.jsx index 0de1353..07d5682 100644 --- a/frontend/src/pages/GroceryList.jsx +++ b/frontend/src/pages/GroceryList.jsx @@ -72,7 +72,7 @@ export default function GroceryList() { let newQuantity = quantity; const item = await getItemByName(itemName); - if (item) { + if (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}?`