diff --git a/web/lib/firebase/bets.ts b/web/lib/firebase/bets.ts index 287a98a2..982d4f89 100644 --- a/web/lib/firebase/bets.ts +++ b/web/lib/firebase/bets.ts @@ -52,10 +52,11 @@ export function listenForUserBets( }) } -export function withoutAnteBets(contract: Contract, bets: Bet[]) { +export function withoutAnteBets(contract: Contract, bets?: Bet[]) { const { createdTime } = contract if ( + bets && bets.length >= 2 && bets[0].createdTime === createdTime && bets[1].createdTime === createdTime @@ -63,5 +64,5 @@ export function withoutAnteBets(contract: Contract, bets: Bet[]) { return bets.slice(2) } - return bets + return bets ?? [] } diff --git a/web/pages/activity.tsx b/web/pages/activity.tsx index 359990dd..319dde6c 100644 --- a/web/pages/activity.tsx +++ b/web/pages/activity.tsx @@ -77,7 +77,7 @@ export function ActivityFeed(props: {