mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-08-08 06:55:26 +02:00
refactor
refactor
This commit is contained in:
parent
5a96e5ce8e
commit
c053e2ac0a
1 changed files with 4 additions and 6 deletions
|
@ -64,13 +64,11 @@ class Pages {
|
|||
*/
|
||||
static removeChildren(pagesAvailable, parent) {
|
||||
pagesAvailable.forEach(async (item, index) => {
|
||||
if (item !== null && item._parent === parent) {
|
||||
if (item === null || item._parent !== parent) {
|
||||
return;
|
||||
}
|
||||
pagesAvailable[index] = null;
|
||||
pagesAvailable = Pages.removeChildren(pagesAvailable, item._id);
|
||||
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
return pagesAvailable;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue