Skip to content

Commit

Permalink
remove redundant call to get productType
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewHEguardian committed Oct 27, 2023
1 parent 3a6a79f commit 4dc6822
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -437,12 +437,8 @@ export const DeliveryAddressUpdate = (props: WithProductType<ProductType>) => {
contactIdToArrayOfProductDetailAndProductType,
)
.flatMap(flattenEquivalent)
.some(({ productDetail }) => {
return (
GROUPED_PRODUCT_TYPES.subscriptions.mapGroupedToSpecific(
productDetail,
).productType === 'nationaldelivery'
);
.some(({ productType }) => {
return productType.productType === 'nationaldelivery';
});

if (hasNationalDelivery) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,8 @@ export const DeliveryAddressStep = (props: DeliveryAddressStepProps) => {
contactIdToArrayOfProductDetailAndProductType,
)
.flatMap(flattenEquivalent)
.some(({ productDetail }) => {
return (
GROUPED_PRODUCT_TYPES.subscriptions.mapGroupedToSpecific(
productDetail,
).productType === 'nationaldelivery'
);
.some(({ productType }) => {
return productType.productType === 'nationaldelivery';
});

if (hasNationalDelivery) {
Expand Down

0 comments on commit 4dc6822

Please sign in to comment.