mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05: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) ->
|
ProjectEntityHandler.getAllEntitiesFromProject project, (err, docs, files) ->
|
||||||
return next(err) if err?
|
return next(err) if err?
|
||||||
entities = docs.concat(files)
|
entities = docs.concat(files)
|
||||||
|
.sort (a, b) -> a.path > b.path # Sort by path ascending
|
||||||
.map (e) -> {
|
.map (e) -> {
|
||||||
path: e.path,
|
path: e.path,
|
||||||
type: if e.doc? then 'doc' else 'file'
|
type: if e.doc? then 'doc' else 'file'
|
||||||
|
|
Loading…
Reference in a new issue