Просмотр исходного кода

Sort the project entities by path

Shane Kilkelly 8 лет назад
Родитель
Сommit
30beb098ab
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      services/web/app/coffee/Features/Project/ProjectController.coffee

+ 1 - 0
services/web/app/coffee/Features/Project/ProjectController.coffee

@@ -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'