mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-05 06:54:36 +08:00
allowing change if undefined or null
This commit is contained in:
parent
6a0ba9d64d
commit
242e017371
1 changed files with 4 additions and 1 deletions
|
|
@ -840,7 +840,10 @@ export async function setStreakHourOffset(
|
|||
|
||||
const user = await UserDAL.getUser(uid, "update user profile");
|
||||
|
||||
if (user.streak?.hourOffset !== undefined) {
|
||||
if (
|
||||
user.streak?.hourOffset !== undefined &&
|
||||
user.streak?.hourOffset !== null
|
||||
) {
|
||||
throw new MonkeyError(403, "Streak hour offset already set");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue