bug fix on missing task

This commit is contained in:
Tyler Renelle 2012-09-24 21:28:10 -04:00
parent 9d165a0ff7
commit f78cd64218
2 changed files with 3 additions and 2 deletions

View file

@ -104,7 +104,7 @@ ready(function(model) {
}
tour.start();
model.on('set', '_user.tasks.*.completed', function(i, completed, previous, isLocal, passed) {
var direction, from, fromIds, to, toIds, _ref3, _ref4;
var direction, from, fromIds, task, to, toIds, _ref3, _ref4;
if ((passed != null) && passed.cron) {
return;
}
@ -117,6 +117,7 @@ ready(function(model) {
}
throw new Error("Direction neither 'up' nor 'down' on checkbox set.");
};
task = model.at("_user.tasks." + i);
scoring.score(i, direction());
if (task.get('type') === 'todo') {
_ref3 = direction() === 'up' ? ['todo', 'completed'] : ['completed', 'todo'], from = _ref3[0], to = _ref3[1];

View file

@ -106,7 +106,7 @@ ready (model) ->
throw new Error("Direction neither 'up' nor 'down' on checkbox set.")
# Score the user based on todo task
# task = model.at("_user.tasks.#{i}")
task = model.at("_user.tasks.#{i}")
scoring.score(i, direction())
# Then move the todos to/from _todoList/_completedList