diff --git a/src/store/index.js b/src/store/index.js index c7f823c3c..4f360cc18 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -3621,25 +3621,25 @@ export function mapTaxedLineItemsToStoreFormat(availableLineItems, storeLineItem export function getArrayOfAllLineItemsAndChildParts(lineItems) { let consolidatedLineItemsArray = []; - if (lineItems.glassParts != null) + if (lineItems?.glassParts != null) consolidatedLineItemsArray = [ ...consolidatedLineItemsArray, ...getFlattenedArrayOfLineItemsWithChildParts(lineItems.glassParts), ]; - if (lineItems.supportingItems != null) + if (lineItems?.supportingItems != null) consolidatedLineItemsArray = [ ...consolidatedLineItemsArray, ...getFlattenedArrayOfLineItemsWithChildParts(lineItems.supportingItems), ]; - if (lineItems.vaps != null) + if (lineItems?.vaps != null) consolidatedLineItemsArray = [ ...consolidatedLineItemsArray, ...getFlattenedArrayOfLineItemsWithChildParts(lineItems.vaps), ]; - if (lineItems.promos != null) + if (lineItems?.promos != null) consolidatedLineItemsArray = [ ...consolidatedLineItemsArray, ...getFlattenedArrayOfLineItemsWithChildParts(lineItems.promos),