mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Sort the project entities by path
This commit is contained in:
@@ -163,6 +163,7 @@ module.exports = ProjectController =
|
||||
ProjectEntityHandler.getAllEntitiesFromProject project, (err, docs, files) ->
|
||||
return next(err) if err?
|
||||
entities = docs.concat(files)
|
||||
.sort (a, b) -> a.path > b.path # Sort by path ascending
|
||||
.map (e) -> {
|
||||
path: e.path,
|
||||
type: if e.doc? then 'doc' else 'file'
|
||||
|
||||
Reference in New Issue
Block a user