mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-14 21:27:23 +01:00
Api task streak default value (#13557)
* Default value for task streak (fix #13372) * Truncate task streak value decimals on update
This commit is contained in:
@@ -688,6 +688,8 @@ api.updateTask = {
|
||||
-user.preferences.timezoneOffset,
|
||||
).date()];
|
||||
}
|
||||
if (task.streak === undefined) task.streak = 0;
|
||||
task.streak = Math.trunc(task.streak);
|
||||
}
|
||||
|
||||
setNextDue(task, user);
|
||||
|
||||
Reference in New Issue
Block a user