diff --git a/functions/src/reset-betting-streaks.ts b/functions/src/reset-betting-streaks.ts index 924f5c22..56e450fa 100644 --- a/functions/src/reset-betting-streaks.ts +++ b/functions/src/reset-betting-streaks.ts @@ -28,7 +28,7 @@ const resetBettingStreakForUser = async (user: User) => { const betStreakResetTime = Date.now() - DAY_MS // if they made a bet within the last day, don't reset their streak if ( - (user.lastBetTime ?? 0 > betStreakResetTime) || + (user?.lastBetTime ?? 0) > betStreakResetTime || !user.currentBettingStreak || user.currentBettingStreak === 0 )