From 71ccfc0ed1c633867b2c8512f317642da840083f Mon Sep 17 00:00:00 2001 From: Julian Maurer Date: Fri, 20 Dec 2024 12:12:59 +0100 Subject: [PATCH] Workaround for estimated recurrences in modified order --- src/pricing.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pricing.ts b/src/pricing.ts index 7e682bb..9c23b09 100644 --- a/src/pricing.ts +++ b/src/pricing.ts @@ -1261,7 +1261,7 @@ export const getRecurrencesWithEstimatedPrices = (lineItems: PriceItems | undefi lineItems?.forEach((lineItem) => { if (isCompositePriceItem(lineItem)) { lineItem.item_components?.forEach((component) => { - const recurrence = component.type === 'recurring' ? component.billing_period : component.type; + const recurrence = component._price?.type === 'recurring' ? component._price?.billing_period : component.type; if (recurrence !== undefined) { recurrences[recurrence] =