mirror of
https://github.com/overleaf/overleaf.git
synced 2025-03-03 13:31:27 +00:00
Sort the project entities by path
This commit is contained in:
parent
08263180fa
commit
30beb098ab
1 changed files with 1 additions and 0 deletions
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue