mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-08-09 15:35:25 +02:00
reverse children sorting
This commit is contained in:
parent
23abb4584c
commit
a6e5308565
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@ const asyncMiddleware = require('../../utils/asyncMiddleware');
|
|||
function createMenuTree(pages) {
|
||||
return pages.filter(page => page._parent === '0').map(page => {
|
||||
return Object.assign({
|
||||
children: pages.filter(child => child._parent === page._id)
|
||||
children: pages.filter(child => child._parent === page._id).reverse()
|
||||
}, page.data);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue