Fix ordering

This commit is contained in:
Chris Blanchard 2015-09-14 22:26:57 +01:00
parent 41d2f4417e
commit 50f86b66d4

View file

@ -15,7 +15,7 @@ var Chatroom = React.createClass({
history.push(data);
self.setProps({
history: history.sort((a, b) => {
return a.createdAt - b.createAt;
return new Date(a.createdAt) - new Date(b.createdAt);
})
});
self.scrollToBottom();