mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-13 15:38:59 +00:00
better wasCorrupted test
This commit is contained in:
parent
81eb2afd9d
commit
3b3d4d243a
1 changed files with 1 additions and 2 deletions
|
|
@ -50,8 +50,7 @@ cleanupCorruptTasks = (model) ->
|
||||||
preened = _.filter union, (id) -> id and _.contains(taskIds, id)
|
preened = _.filter union, (id) -> id and _.contains(taskIds, id)
|
||||||
|
|
||||||
# There were indeed issues found, set the new list
|
# There were indeed issues found, set the new list
|
||||||
wasCorrupted = !_.isEmpty _.difference(idList, preened)
|
if !_.isEqual(idList, preened)
|
||||||
if wasCorrupted
|
|
||||||
batch.set("#{type}Ids", preened)
|
batch.set("#{type}Ids", preened)
|
||||||
console.error user.get('id') + "'s #{type}s were corrupt."
|
console.error user.get('id') + "'s #{type}s were corrupt."
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue