mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 12:02:13 +00:00
fixed undo on checkboxed items
This commit is contained in:
parent
2f3d0fa86a
commit
10e9d3eb40
1 changed files with 5 additions and 1 deletions
|
|
@ -207,7 +207,11 @@ module.exports.app = (appExports, model) ->
|
|||
batch.startTransaction()
|
||||
_.each undo.stats, (val, key) -> batch.set "stats.#{key}", val
|
||||
taskPath = "tasks.#{undo.task.id}"
|
||||
_.each undo.task, (val, key) -> batch.set "#{taskPath}.#{key}", val
|
||||
_.each undo.task, (val, key) ->
|
||||
if key is 'completed'
|
||||
user.pass({cron:true}).set("#{taskPath}.completed",val)
|
||||
else
|
||||
batch.set "#{taskPath}.#{key}", val
|
||||
batch.commit()
|
||||
model.del '_undo'
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue