mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-28 01:21:13 +01:00
refactor: remove pointless true
This commit is contained in:
@@ -156,7 +156,7 @@ Categories.setUnread = async function (tree, cids, uid) {
|
|||||||
if (category) {
|
if (category) {
|
||||||
category.unread = false;
|
category.unread = false;
|
||||||
if (unreadCids.includes(category.cid)) {
|
if (unreadCids.includes(category.cid)) {
|
||||||
category.unread = category.topic_count > 0 && true;
|
category.unread = category.topic_count > 0;
|
||||||
} else if (category.children.length) {
|
} else if (category.children.length) {
|
||||||
category.children.forEach(setCategoryUnread);
|
category.children.forEach(setCategoryUnread);
|
||||||
category.unread = category.children.some(c => c && c.unread);
|
category.unread = category.children.some(c => c && c.unread);
|
||||||
|
|||||||
Reference in New Issue
Block a user