Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Commit

Permalink
IMPROVE: make sort algo more elegant
Browse files Browse the repository at this point in the history
  • Loading branch information
merefield committed Dec 22, 2019
1 parent 01a24ab commit cc25fb9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions assets/javascripts/discourse/components/team-display.js.es6
Expand Up @@ -53,9 +53,9 @@ export default Ember.Component.extend({
});

people.sort(
(a, b) => ((a.username_lower > b.username_lower) ? 1 : -1)
);
(a, b) => (a.username_lower.localeCompare(b.username_lower) )
);

people.sort(
(a, b) => ((times_score(a.offset,n) < times_score(b.offset,n)) ? 1 : -1)
);
Expand Down

0 comments on commit cc25fb9

Please sign in to comment.