mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-02-04 14:39:02 +08:00
refactor: duplicating object to make sure old streak is logged
This commit is contained in:
parent
76537fae4f
commit
0a163582bd
1 changed files with 1 additions and 1 deletions
|
|
@ -993,7 +993,7 @@ export async function updateStreak(
|
|||
if (isYesterday(streak.lastResultTimestamp, streak.hourOffset ?? 0)) {
|
||||
streak.length += 1;
|
||||
} else if (!isToday(streak.lastResultTimestamp, streak.hourOffset ?? 0)) {
|
||||
Logger.logToDb("streak_lost", { streak }, uid);
|
||||
Logger.logToDb("streak_lost", JSON.parse(JSON.stringify(streak)), uid);
|
||||
streak.length = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue