mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
fix to #1401 "add task to empty list"
This commit is contained in:
@@ -236,7 +236,7 @@ UserSchema.post('init', function(doc) {
|
||||
}
|
||||
|
||||
_.each(doc.tasks, function(task, k) {
|
||||
if ((task != null ? task.id : void 0) == null) {
|
||||
if (!task || !task.id) {
|
||||
return delete doc.tasks[k];
|
||||
}
|
||||
if (isNaN(+task.value)) {
|
||||
|
||||
Reference in New Issue
Block a user