fix to #1401 "add task to empty list"

This commit is contained in:
Tyler Renelle 2013-09-03 19:48:10 -04:00
parent e5bafe7f0b
commit 5f2405a3f4
2 changed files with 2 additions and 2 deletions

View file

@ -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)) {

View file

@ -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