fix alphabetical sort order in files view

This commit is contained in:
Dmitry Vasilev
2023-06-05 12:10:58 +03:00
parent 34639b0ae3
commit 6a984e0c4e

View File

@@ -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 {