mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 12:02:13 +00:00
fix to previous commit
This commit is contained in:
parent
9222b56777
commit
ba750141cf
1 changed files with 2 additions and 2 deletions
|
|
@ -266,10 +266,10 @@ cron = (model) ->
|
|||
tasks = user.get('tasks')
|
||||
_.each tasks, (task, key) ->
|
||||
# Remove null tasks
|
||||
unless task?
|
||||
unless task?.type?
|
||||
user.del("tasks.#{key}")
|
||||
# Put rogue tasks back into their lists. We could alternatively delete them (they're rogue because they weren't properly deleted), but that's dangerous
|
||||
if user.get("#{task.type}Ids").indexOf(task.id) is -1
|
||||
else if user.get("#{task.type}Ids").indexOf(task.id) is -1
|
||||
user.push "#{task.type}Ids", task.id
|
||||
|
||||
batch = new character.BatchUpdate(model)
|
||||
|
|
|
|||
Loading…
Reference in a new issue