mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 23:27:26 +01:00
Update Orb of Rebirth to ignore completed todos (#13773)
* added logic to exclude completed tasks from having task.value set to 0 * logic refinement * fix(rebirth): complete D Co-authored-by: SabreCat <sabe@habitica.com>
This commit is contained in:
@@ -42,7 +42,7 @@ export default function rebirth (user, tasks = [], req = {}, analytics) {
|
||||
|
||||
each(tasks, task => {
|
||||
if (!task.challenge || !task.challenge.id || task.challenge.broken) {
|
||||
if (task.type !== 'reward') {
|
||||
if (task.type !== 'reward' && task.type !== 'todo') {
|
||||
task.value = 0;
|
||||
}
|
||||
if (task.type === 'daily') {
|
||||
@@ -52,6 +52,9 @@ export default function rebirth (user, tasks = [], req = {}, analytics) {
|
||||
task.counterDown = 0;
|
||||
task.counterUp = 0;
|
||||
}
|
||||
if (task.type === 'todo' && task.completed !== true) {
|
||||
task.value = 0;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user