mirror of
https://github.com/leporello-js/leporello-js
synced 2026-01-13 21:14:28 -08:00
fix alphabetical sort order in files view
This commit is contained in:
@@ -92,13 +92,11 @@ const do_load_dir = async (handle, path) => {
|
|||||||
name: handle.name,
|
name: handle.name,
|
||||||
path,
|
path,
|
||||||
kind: 'directory',
|
kind: 'directory',
|
||||||
children: await Promise.all(
|
children: (await Promise.all(
|
||||||
children
|
children.map(c =>
|
||||||
.map(c =>
|
do_load_dir(c, path == null ? c.name : path + '/' + c.name)
|
||||||
do_load_dir(c, path == null ? c.name : path + '/' + c.name)
|
)
|
||||||
)
|
)).sort((a, b) => a.name.localeCompare(b.name))
|
||||||
.sort((a,b) => a.name > b.name)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
} else if(handle.kind == 'file') {
|
} else if(handle.kind == 'file') {
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user