diff --git a/common/src/util/freebuff-streak.ts b/common/src/util/freebuff-streak.ts index f61f22832a..4b70bc2e97 100644 --- a/common/src/util/freebuff-streak.ts +++ b/common/src/util/freebuff-streak.ts @@ -48,7 +48,7 @@ export function getFreebuffUsageDateKey( export function addDaysToDateKey(dateKey: string, days: number): string { const date = new Date(`${dateKey}T00:00:00.000Z`) - if (Number.isNaN(date.getTime())) { + if (!Number.isFinite(date.getTime())) { throw new Error(`Invalid date key: ${dateKey}`) }