Properly sort suggestions

This commit is contained in:
Aaron Lindsay 2016-12-29 21:35:26 -05:00
parent cfd25d986c
commit d7adb27c10

View File

@ -55,7 +55,7 @@ module.exports = React.createClass({
var attendeeList = this.getAttendeeList(); var attendeeList = this.getAttendeeList();
var suggestionIds = Object.keys(this.props.suggestions); var suggestionIds = Object.keys(this.props.suggestions);
suggestionIds.sort(); suggestionIds.sort(function(a, b){return parseInt(a, 10) - parseInt(b, 10);});
var suggestions = []; var suggestions = [];
for (var i in suggestionIds) { for (var i in suggestionIds) {
var suggestion = this.props.suggestions[suggestionIds[i]]; var suggestion = this.props.suggestions[suggestionIds[i]];