mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-16 11:11:43 +00:00
#1499 check that task[0] exists first
This commit is contained in:
parent
d966833782
commit
b4ff7d4be4
1 changed files with 1 additions and 1 deletions
|
|
@ -11,7 +11,7 @@ angular.module('habitrpg')
|
|||
})
|
||||
.filter('completedFilter', function(){
|
||||
return function(tasks,_showCompleted) {
|
||||
if (tasks[0].type != 'todo') return tasks;
|
||||
if (!tasks[0] || tasks[0].type != 'todo') return tasks;
|
||||
return _.where(tasks, {completed:!!_showCompleted});
|
||||
}
|
||||
})
|
||||
Loading…
Reference in a new issue