diff --git a/web/src/components/transactions/purchase/PurchaseItems.tsx b/web/src/components/transactions/purchase/PurchaseItems.tsx index 9d442ea2..dbcc8831 100644 --- a/web/src/components/transactions/purchase/PurchaseItems.tsx +++ b/web/src/components/transactions/purchase/PurchaseItems.tsx @@ -230,15 +230,17 @@ export default function PurchaseItems({ group, transaction }: PropTypes) { const [positions, setPositions] = useState([]); useEffect(() => { - setPositions(transaction.positions - .map((p) => ({ ...p, is_empty: false })) - .concat([ - { - ...localPositionChanges.empty, - is_empty: true, - }, - ])); - }, [transaction, setPositions, localPositionChanges]) + setPositions( + transaction.positions + .map((p) => ({ ...p, is_empty: false })) + .concat([ + { + ...localPositionChanges.empty, + is_empty: true, + }, + ]) + ); + }, [transaction, setPositions, localPositionChanges]); // find all accounts that take part in the transaction, either via debitor shares or purchase items // TODO: should we add creditor accounts as well? @@ -542,7 +544,7 @@ export default function PurchaseItems({ group, transaction }: PropTypes) { {transaction.is_wip - ? positions.map(position => ( + ? positions.map((position) => ( )) : positions.map( - position => + (position) => !position.is_empty && ( {position.name}