fix(budget): use Map.get() to fix category rename no-op (#855)

This commit is contained in:
Julien G.
2026-04-23 15:13:48 +02:00
committed by GitHub
parent e4a2c8ce92
commit d169334cfd
+1 -1
View File
@@ -634,7 +634,7 @@ export default function BudgetPanel({ tripId, tripMembers = [] }: BudgetPanelPro
}
const handleRenameCategory = async (oldName, newName) => {
if (!newName.trim() || newName.trim() === oldName) return
const items = grouped[oldName] || []
const items = grouped.get(oldName) || []
for (const item of Array.from(items)) await updateBudgetItem(tripId, item.id, { category: newName.trim() })
}
const handleAddCategory = () => {