mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-14 18:22:21 +00:00
bug fix on missing task
This commit is contained in:
parent
9d165a0ff7
commit
f78cd64218
2 changed files with 3 additions and 2 deletions
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue