Skip to content

Commit

Permalink
fix: dupes in unread followed topics
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Aug 25, 2020
1 parent 39f4bba commit 55533b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/topics/unread.js
Expand Up @@ -184,7 +184,7 @@ module.exports = function (Topics) {
tids = topicData.filter(t => filterCids.includes(t.cid)).map(t => t.tid);
}
const scores = await db.sortedSetScores('topics:recent', tids);
const data = tids.map((tid, index) => ({ value: tid, score: scores[index] }));
const data = tids.map((tid, index) => ({ value: String(tid), score: scores[index] }));
return data.filter(item => item.score > params.cutoff);
}

Expand Down

0 comments on commit 55533b1

Please sign in to comment.