diff --git a/lib/app/index.js b/lib/app/index.js index 44dd80a381..41232455e0 100644 --- a/lib/app/index.js +++ b/lib/app/index.js @@ -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]; diff --git a/src/app/index.coffee b/src/app/index.coffee index 29f2413747..02ff965037 100644 --- a/src/app/index.coffee +++ b/src/app/index.coffee @@ -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