missing completeds

This commit is contained in:
Tyler Renelle 2013-01-24 00:15:27 -05:00
parent 54df0c16ff
commit ec2eac31c0

View file

@ -66,6 +66,7 @@ get '/', (page, model, next) ->
# 2. restore missing zombie tasks back into list
where = {type:type}
if type in ['completed', 'todo']
where.type = 'todo'
where.completed = if type == 'completed' then true else false
taskIds = _.pluck( _.where(userObj.tasks, where), 'id')
union = _.union userObj[path], taskIds