From b03f4e02ef6a1fa4776775f2d1691b09882c4247 Mon Sep 17 00:00:00 2001 From: Kelly Phan Date: Wed, 28 Aug 2024 12:22:06 +0200 Subject: [PATCH] fix(lago-257): add empty string on save --- src/core/serializers/serializePlanInput.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/serializers/serializePlanInput.ts b/src/core/serializers/serializePlanInput.ts index e3618363f..e7521a331 100644 --- a/src/core/serializers/serializePlanInput.ts +++ b/src/core/serializers/serializePlanInput.ts @@ -149,12 +149,14 @@ export const serializePlanInput = (values: PlanFormInput) => { usageThresholds: [ ...(nonRecurringUsageThresholds ?? []).map((threshold) => ({ ...threshold, + thresholdDisplayName: threshold.thresholdDisplayName || '', amountCents: Number(serializeAmount(threshold.amountCents, values.amountCurrency)), })), ...(recurringUsageThreshold ? [ { ...recurringUsageThreshold, + thresholdDisplayName: recurringUsageThreshold.thresholdDisplayName || '', amountCents: Number( serializeAmount(recurringUsageThreshold.amountCents, values.amountCurrency), ),