# HG changeset patch # User ymh # Date 1498128671 -7200 # Node ID b4f9114b3a86ba8ac2843aec0ead7481acff9667 # Parent 15ebcb57b544fba6c1d50fa45d288d5772a7ff00 Use sortBy which is more compact diff -r 15ebcb57b544 -r b4f9114b3a86 client/src/components/Session.js --- a/client/src/components/Session.js Thu Jun 22 12:37:53 2017 +0200 +++ b/client/src/components/Session.js Thu Jun 22 12:51:11 2017 +0200 @@ -52,7 +52,7 @@ const currentSession = sessions.find(session => session._id === sessionId); const currentNotes = notes.filter(note => { return note.session === sessionId; - }).sort((n1,n2) => { return n1.get('startedAt').localeCompare(n2.get('startedAt')); }); + }).sortBy( n => n.get('startedAt') ); return { currentSession,