Skip to content

Commit

Permalink
make userlist emoji sort work
Browse files Browse the repository at this point in the history
  • Loading branch information
KDSBrowne committed Aug 17, 2018
1 parent dfa0924 commit b67aecc
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ const sortUsersByEmoji = (a, b) => {
const emojiA = statusA in EMOJI_STATUSES ? EMOJI_STATUSES[statusA] : statusA;
const emojiB = statusB in EMOJI_STATUSES ? EMOJI_STATUSES[statusB] : statusB;

if (emojiA && emojiB && (emojiA !== EMOJI_STATUSES.none && emojiB !== EMOJI_STATUSES.none)) {
if (emojiA && emojiB && (emojiA !== 'none' && emojiB !== 'none')) {
if (a.emoji.changedAt < b.emoji.changedAt) {
return -1;
} else if (a.emoji.changedAt > b.emoji.changedAt) {
return 1;
}
} else if (emojiA && emojiA !== EMOJI_STATUSES.none) {
} else if (emojiA && emojiA !== 'none') {
return -1;
} else if (emojiB && emojiB !== EMOJI_STATUSES.none) {
} else if (emojiB && emojiB !== 'none') {
return 1;
}
return 0;
Expand Down

0 comments on commit b67aecc

Please sign in to comment.