mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-02 04:00:36 +00:00
fix to #1401 "add task to empty list"
This commit is contained in:
parent
e5bafe7f0b
commit
5f2405a3f4
2 changed files with 2 additions and 2 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ div(ng-controller='TasksCtrl')
|
|||
hr
|
||||
|
||||
// Actual List
|
||||
ul(class='{{list.type}}s', ng-show='user[list.type + "s"]', habitrpg-sortable)
|
||||
ul(class='{{list.type}}s', ng-show='user[list.type + "s"].length > 0', habitrpg-sortable)
|
||||
include ./task
|
||||
|
||||
// Static Rewards
|
||||
|
|
|
|||
Loading…
Reference in a new issue