Skip to content

Commit

Permalink
fix(archive): PR Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
mickr committed Jan 16, 2020
1 parent 3e0a5ec commit e8755db
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/viewers/archive/ArchiveExplorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,15 @@ class ArchiveExplorer extends React.Component {
*/
sortItemList(itemList) {
const { sortBy, sortDirection } = this.state;
let sortedItems;

if (!sortBy.length) {
return itemList;
}

let sortedItems;

try {
sortedItems = itemList.sort((a, b) => {
sortedItems = itemList.sort((a = {}, b = {}) => {
if (!a[sortBy] || !b[sortBy]) {
return -1;
}
Expand Down

0 comments on commit e8755db

Please sign in to comment.