From c28494724f33049b58fe1f772d19f2dbd0c999f9 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Mon, 4 Jan 2016 22:50:35 +0200 Subject: [PATCH] filter dupes --- src/topics/unread.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/topics/unread.js b/src/topics/unread.js index 3ea3d5b10c..d9f23d4b91 100644 --- a/src/topics/unread.js +++ b/src/topics/unread.js @@ -169,8 +169,8 @@ module.exports = function(Topics) { return callback(); } - tids = tids.filter(function(tid) { - return tid && utils.isNumber(tid); + tids = tids.filter(function(tid, index, array) { + return tid && utils.isNumber(tid) && array.indexOf(tid) === index; }); if (!tids.length) {