Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Change spelling of collectible to collectable
Browse files Browse the repository at this point in the history
  • Loading branch information
opr committed Mar 10, 2023
1 parent 88a1ae7 commit 24c0ac3
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ const PickupLocation = (): JSX.Element | null => {
const flattenedRates = cartShippingRates.flatMap(
( cartShippingRate ) => cartShippingRate.shipping_rates
);
const selectedCollectibleRate = flattenedRates.find(
const selectedCollectableRate = flattenedRates.find(
( rate ) => rate.selected && isPackageRateCollectable( rate )
);

// If the rate has an address specified in its metadata.
if (
isObject( selectedCollectibleRate ) &&
objectHasProp( selectedCollectibleRate, 'meta_data' )
isObject( selectedCollectableRate ) &&
objectHasProp( selectedCollectableRate, 'meta_data' )
) {
const selectedRateMetaData = selectedCollectibleRate.meta_data.find(
const selectedRateMetaData = selectedCollectableRate.meta_data.find(
( meta ) => meta.key === 'pickup_address'
);
if (
Expand All @@ -36,15 +36,15 @@ const PickupLocation = (): JSX.Element | null => {
const selectedRatePickupAddress = selectedRateMetaData.value;
return {
pickupAddress: selectedRatePickupAddress,
pickupMethod: selectedCollectibleRate.name,
pickupMethod: selectedCollectableRate.name,
};
}
}

if ( isObject( selectedCollectibleRate ) ) {
if ( isObject( selectedCollectableRate ) ) {
return {
pickupAddress: undefined,
pickupMethod: selectedCollectibleRate.name,
pickupMethod: selectedCollectableRate.name,
};
}
return {
Expand Down

0 comments on commit 24c0ac3

Please sign in to comment.