From d7adb27c10846e75a22540553319d7e820473ffe Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Thu, 29 Dec 2016 21:35:26 -0500 Subject: [PATCH] Properly sort suggestions --- js/components/RecordLunch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/components/RecordLunch.js b/js/components/RecordLunch.js index 8b962f6..8c9525a 100644 --- a/js/components/RecordLunch.js +++ b/js/components/RecordLunch.js @@ -55,7 +55,7 @@ module.exports = React.createClass({ var attendeeList = this.getAttendeeList(); var suggestionIds = Object.keys(this.props.suggestions); - suggestionIds.sort(); + suggestionIds.sort(function(a, b){return parseInt(a, 10) - parseInt(b, 10);}); var suggestions = []; for (var i in suggestionIds) { var suggestion = this.props.suggestions[suggestionIds[i]];