From 0318f7a12bc196f09f778878f38d1bd2a6ed5954 Mon Sep 17 00:00:00 2001 From: Ian Philips Date: Mon, 29 Aug 2022 13:47:24 -0600 Subject: [PATCH] Add missing parentheses --- functions/src/reset-betting-streaks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 )