diff --git a/js/reducers/PopularAttendeeReducer.js b/js/reducers/PopularAttendeeReducer.js index de993e4..8b6fdb5 100644 --- a/js/reducers/PopularAttendeeReducer.js +++ b/js/reducers/PopularAttendeeReducer.js @@ -10,7 +10,7 @@ module.exports = function(state = [], action) { for (var i = 0; i < action.attendees.length; i++) { attendees.push(action.attendees[i]); } - attendees.sort(function(a, b){return a.Popularity - b.Popularity}); + attendees.sort(function(a, b){return b.Popularity - a.Popularity}); return attendees; case UserConstants.USER_LOGGEDOUT: return []; diff --git a/js/reducers/PopularSuggestionReducer.js b/js/reducers/PopularSuggestionReducer.js index d2b2b79..ca783bd 100644 --- a/js/reducers/PopularSuggestionReducer.js +++ b/js/reducers/PopularSuggestionReducer.js @@ -10,7 +10,7 @@ module.exports = function(state = [], action) { for (var i = 0; i < action.suggestions.length; i++) { suggestions.push(action.suggestions[i]); } - suggestions.sort(function(a, b){return a.Popularity - b.Popularity}); + suggestions.sort(function(a, b){return b.Popularity - a.Popularity}); return suggestions; case UserConstants.USER_LOGGEDOUT: return [];