fixed so the code compiles
This commit is contained in:
@@ -17,7 +17,7 @@ async function upsertLeaderboardEntry(userId, grade, { elo, bestTime, correctAns
|
||||
},
|
||||
update: {
|
||||
...(elo !== undefined && { elo }),
|
||||
...(bestTime !== undefined && existing?.bestTime == null || bestTime < (existing?.bestTime ?? Infinity)
|
||||
...(bestTime !== undefined && (existing?.bestTime == null || bestTime < existing.bestTime)
|
||||
? { bestTime }
|
||||
: {}),
|
||||
gamesPlayed: { increment: 1 },
|
||||
|
||||
Reference in New Issue
Block a user