mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
chore: eslint max-len
This commit is contained in:
committed by
Julian Lam
parent
5c2f0f0557
commit
cc9d6fd08b
@@ -315,7 +315,12 @@ helpers.getVisibleCategories = async function (params) {
|
||||
return false;
|
||||
}
|
||||
const hasVisibleChildren = checkVisibleChildren(c, cidToAllowed, cidToWatchState, states);
|
||||
const isCategoryVisible = cidToAllowed[c.cid] && (showLinks || !c.link) && !c.disabled && states.includes(cidToWatchState[c.cid]);
|
||||
const isCategoryVisible = (
|
||||
cidToAllowed[c.cid] &&
|
||||
(showLinks || !c.link) &&
|
||||
!c.disabled &&
|
||||
states.includes(cidToWatchState[c.cid])
|
||||
);
|
||||
const shouldBeRemoved = !hasVisibleChildren && !isCategoryVisible;
|
||||
const shouldBeDisaplayedAsDisabled = hasVisibleChildren && !isCategoryVisible;
|
||||
|
||||
@@ -380,7 +385,8 @@ function checkVisibleChildren(c, cidToAllowed, cidToWatchState, states) {
|
||||
return false;
|
||||
}
|
||||
return c.children.some(c => !c.disabled && (
|
||||
(cidToAllowed[c.cid] && states.includes(cidToWatchState[c.cid])) || checkVisibleChildren(c, cidToAllowed, cidToWatchState, states)
|
||||
(cidToAllowed[c.cid] && states.includes(cidToWatchState[c.cid])) ||
|
||||
checkVisibleChildren(c, cidToAllowed, cidToWatchState, states)
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user