Skip to content

Commit

Permalink
fix: sort visualize tree (#6110)
Browse files Browse the repository at this point in the history
Co-authored-by: k k <kleangseu@yahoo.com>
  • Loading branch information
leangseu and k k committed Feb 8, 2023
1 parent bba1d1b commit 26dcc00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/components/admin/admin-pages-visualize.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default {
const truncatePath = path => _.take(path.split('/'), depth).join('/')
const descendantsByChild =
Object.entries(_.groupBy(descendants, page => truncatePath(page.path)))
.map(([childPath, descendantsGroup]) => [getPage(childPath), descendantsGroup])
.map(([childPath, descendantsGroup]) => [getPage(childPath), _.sortBy(descendantsGroup, child => child.path)])
.map(([child, descendantsGroup]) =>
[child, _.filter(descendantsGroup, d => d.path !== child.path)])
return {
Expand Down

0 comments on commit 26dcc00

Please sign in to comment.