From 0a59d6e43d88cf6399d13e22ba19ff86fc27e9bb Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Thu, 31 Jan 2013 21:50:36 -0500 Subject: [PATCH] another fix on duplicates --- src/app/schema.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/schema.coffee b/src/app/schema.coffee index f591bfee85..5e19490b0b 100644 --- a/src/app/schema.coffee +++ b/src/app/schema.coffee @@ -52,4 +52,5 @@ module.exports.updateUser = (user, userObj) -> preened = _.filter(union, (val) -> _.contains(taskIds, val)) # There were indeed issues found, set the new list - user.set(path, preened) if _.size(preened) != _.size(userObj[path]) \ No newline at end of file + # TODO _.difference might still be empty for duplicates in one list? + user.set(path, preened) if _.difference(preened, userObj[path]).length != 0 \ No newline at end of file