mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
To-Do cron task decay fixes (#12072)
* fix(tasks): improve some cron behaviors Fixes #6488 Fixes #8590 * add test Co-authored-by: Matteo Pagliazzi <matteopagliazzi@gmail.com>
This commit is contained in:
@@ -43,7 +43,7 @@ function _calculateDelta (task, direction, cron) {
|
||||
}
|
||||
|
||||
// If To-Do, point-match the TD per checklist item completed
|
||||
if (task.type === 'todo') {
|
||||
if (task.type === 'todo' && !cron) {
|
||||
nextDelta *= 1 + reduce(task.checklist, (m, i) => m + (i.completed ? 1 : 0), 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user