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:
Benja Appel
2021-10-21 17:47:17 -03:00
committed by GitHub
parent 1c8433ff61
commit c6e7b18e8b

View File

@@ -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);