Skip to content
Snippets Groups Projects
Commit 4c901740 authored by Allen Gilliland's avatar Allen Gilliland
Browse files

fix bug where SortableItemList wasn't properly sorting by last modified time.

parent b97c6f3b
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@ export default class SortableItemList extends React.Component {
render() {
var items;
if (this.state.sort === "Last Modified") {
items = this.props.items.slice().sort((a, b) => a.updated_at < b.updated_at);
items = this.props.items.slice().sort((a, b) => b.updated_at - a.updated_at);
} else if (this.state.sort === "Alphabetical Order") {
items = this.props.items.slice().sort((a, b) => a.name.toLowerCase().localeCompare(b.name.toLowerCase()));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment