Skip to content
This repository has been archived by the owner on Aug 6, 2021. It is now read-only.

Commit

Permalink
Merge pull request #2977 from overleaf/jpa-import-697
Browse files Browse the repository at this point in the history
[ProjectController] fix the sorting of project entities for node v11+

GitOrigin-RevId: d4458aeaf83f610e36669050e664c902dbcce36e
  • Loading branch information
das7pad authored and Copybot committed Jul 8, 2020
1 parent ba6eda5 commit 27e1a4b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/Features/Project/ProjectController.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 27e1a4b

Please sign in to comment.