Skip to content

Commit

Permalink
fix: Show multiple bundles in a single order
Browse files Browse the repository at this point in the history
  • Loading branch information
acasazza committed Jan 17, 2022
1 parent a351b67 commit 6b454a9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/LineItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,13 @@ const LineItem: FunctionComponent<LineItemProps> = (props) => {
items &&
items
.filter((l) => l.item_type === type)
.map((lineItem, k) => {
if (lineItem.item_type === 'bundles' && k > 0) return null
.map((lineItem, k, check) => {
if (
lineItem.item_type === 'bundles' &&
k > 0 &&
check[k - 1].bundle_code === lineItem.bundle_code
)
return null
const lineProps = {
lineItem,
}
Expand Down

0 comments on commit 6b454a9

Please sign in to comment.