diff --git a/public/js/filters/filters.js b/public/js/filters/filters.js index 222a8bb30a..e20db4aadf 100644 --- a/public/js/filters/filters.js +++ b/public/js/filters/filters.js @@ -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}); } }) \ No newline at end of file