All files / app/order removeBundledItems.ts

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10    5x 16x   15x 8x      
import { LineItemMap } from '@bigcommerce/checkout-sdk';
 
export default function removeBundledItems(lineItems: LineItemMap): LineItemMap {
    return {
        ...lineItems,
        physicalItems: lineItems.physicalItems.filter(item => (typeof item.parentId !== 'string')),
        digitalItems: lineItems.digitalItems.filter(item => (typeof item.parentId !== 'string')),
    };
}