We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2b3edbd commit 5b7e016Copy full SHA for 5b7e016
apps/sim/lib/billing/client/utils.ts
@@ -61,7 +61,10 @@ export function getUsage(subscriptionData: SubscriptionData | null | undefined):
61
isExceeded: Boolean(usage.isExceeded),
62
billingPeriodStart: usage.billingPeriodStart ?? null,
63
billingPeriodEnd: usage.billingPeriodEnd ?? null,
64
- lastPeriodCost: typeof usage.lastPeriodCost === 'number' ? usage.lastPeriodCost : 0,
+ lastPeriodCost:
65
+ typeof usage.lastPeriodCost === 'number' && Number.isFinite(usage.lastPeriodCost)
66
+ ? usage.lastPeriodCost
67
+ : 0,
68
}
69
70
0 commit comments