diff --git a/script/index.coffee b/script/index.coffee index 7a6d66b5da..f410d4d51c 100644 --- a/script/index.coffee +++ b/script/index.coffee @@ -485,7 +485,9 @@ api.wrap = (user, main=true) -> # ------ clearCompleted: (req, cb) -> - _.remove user.todos, (t)-> t.completed and !t.challenge?.id + user.todos = _.map user.todos, (t)-> + t.archived = true if t.completed and !t.challenge?.id + t user.markModified? 'todos' cb? null, user.todos