diff --git a/common/src/util/freebuff-session-pools.ts b/common/src/util/freebuff-session-pools.ts index 264ee7ed64..b648405590 100644 --- a/common/src/util/freebuff-session-pools.ts +++ b/common/src/util/freebuff-session-pools.ts @@ -87,7 +87,9 @@ export function getFreebuffSectionQuotas( export function formatFreebuffRowQuota( quota: FreebuffSessionRateLimit, ): string { - const used = Math.min(quota.recentCount, quota.limit) - const count = `${used} of ${quota.limit} ${quota.countsAdmissions ? 'starts' : 'used'}` + const safeRecentCount = Number.isFinite(quota.recentCount) ? quota.recentCount : 0 + const safeLimit = Number.isFinite(quota.limit) ? quota.limit : 0 + const used = Math.min(safeRecentCount, safeLimit) + const count = `${used} of ${safeLimit} ${quota.countsAdmissions ? 'starts' : 'used'}` return quota.poolLabel ? `${quota.poolLabel}: ${count}` : count }