Skip to content

Commit d2049d2

Browse files
committed
address comment on check
1 parent 02161e1 commit d2049d2

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

apps/sim/lib/billing/credits/purchase.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ export async function setUsageLimitForCredits(
2525
): Promise<void> {
2626
try {
2727
const { basePrice } = getPlanPricing(plan)
28-
// `||` not `??` — 0 is never a valid seat count for a paid sub.
28+
2929
const seatCount = seats || 1
30-
const planBase = Number(basePrice) * seatCount
30+
const planBase =
31+
entityType === 'organization' ? Number(basePrice) * seatCount : Number(basePrice)
3132
const creditBalanceNum = Number(creditBalance)
3233
const newLimit = planBase + creditBalanceNum
3334

0 commit comments

Comments
 (0)