mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #2977 from overleaf/jpa-import-697
[ProjectController] fix the sorting of project entities for node v11+ GitOrigin-RevId: d4458aeaf83f610e36669050e664c902dbcce36e
This commit is contained in:
parent
ae068781ca
commit
398d2deb07
1 changed files with 2 additions and 1 deletions
|
@ -362,7 +362,8 @@ const ProjectController = {
|
|||
}
|
||||
const entities = docs
|
||||
.concat(files)
|
||||
.sort((a, b) => a.path > b.path) // Sort by path ascending
|
||||
// Sort by path ascending
|
||||
.sort((a, b) => (a.path > b.path ? 1 : a.path < b.path ? -1 : 0))
|
||||
.map(e => ({
|
||||
path: e.path,
|
||||
type: e.doc != null ? 'doc' : 'file'
|
||||
|
|
Loading…
Reference in a new issue