mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 11:11:04 +01:00
ESlint no-multi-assign
and max-nested-callbacks, no-mixed-requires, max-statements-per-line
This commit is contained in:
@@ -45,11 +45,13 @@ module.exports = function (Categories) {
|
||||
category.disabled = category.hasOwnProperty('disabled') ? parseInt(category.disabled, 10) === 1 : undefined;
|
||||
category.icon = category.icon || 'hidden';
|
||||
if (category.hasOwnProperty('post_count')) {
|
||||
category.post_count = category.totalPostCount = category.post_count || 0;
|
||||
category.post_count = category.post_count || 0;
|
||||
category.totalPostCount = category.post_count;
|
||||
}
|
||||
|
||||
if (category.hasOwnProperty('topic_count')) {
|
||||
category.topic_count = category.totalTopicCount = category.topic_count || 0;
|
||||
category.topic_count = category.topic_count || 0;
|
||||
category.totalTopicCount = category.topic_count;
|
||||
}
|
||||
|
||||
if (category.image) {
|
||||
|
||||
Reference in New Issue
Block a user