fixed a bug where losing a streak would not save max streak length correclty

This commit is contained in:
Miodec 2022-09-28 20:43:13 +02:00
parent 6779e05ae9
commit a273372990

View file

@ -915,7 +915,7 @@ export async function updateStreak(
const streak: MonkeyTypes.UserStreak = {
lastResultTimestamp: user.streak?.lastResultTimestamp ?? 0,
length: user.streak?.length ?? 0,
maxLength: user.streak?.length ?? 0,
maxLength: user.streak?.maxLength ?? 0,
};
if (isYesterday(streak.lastResultTimestamp)) {