diff --git a/app/src/Features/Project/ProjectController.js b/app/src/Features/Project/ProjectController.js index e2770b026a..117030ba49 100644 --- a/app/src/Features/Project/ProjectController.js +++ b/app/src/Features/Project/ProjectController.js @@ -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'