Skip to content
Snippets Groups Projects
Commit 79e8dcfd authored by L4168's avatar L4168
Browse files

returnGameInfo sorts factions by name

parent e686b5d6
No related branches found
No related tags found
3 merge requests!59Development to master,!31Development,!28Group fix
...@@ -132,6 +132,10 @@ export class GameService { ...@@ -132,6 +132,10 @@ export class GameService {
where: { id: id }, where: { id: id },
relations: ['factions', 'objective_points'], relations: ['factions', 'objective_points'],
}); });
// sort factions by their name
game.factions.sort(function(a, b) {
return a['factionName'].localeCompare(b['factionName']);
});
return game; return game;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment