diff --git a/src/app/subscription/subscription-screen.helpers.ts b/src/app/subscription/subscription-screen.helpers.ts index 4cc8406d..a0747b74 100644 --- a/src/app/subscription/subscription-screen.helpers.ts +++ b/src/app/subscription/subscription-screen.helpers.ts @@ -42,7 +42,8 @@ function currencySymbol(currency: string): string { function formatAmount(amountCents: number | null): string | null { if (amountCents === null) return null; - return (amountCents / 100).toFixed(2).replace(/0$/, ""); + if (!Number.isFinite(amountCents)) return null; + return (amountCents / 100).toFixed(2).replace(/\.?0+$/, ""); } function planCaption(