diff --git a/build/react-frontend/src/Components/DuetData/DuetData.js b/build/react-frontend/src/Components/DuetData/DuetData.js index 5b829de..6e5d9ff 100644 --- a/build/react-frontend/src/Components/DuetData/DuetData.js +++ b/build/react-frontend/src/Components/DuetData/DuetData.js @@ -15,7 +15,10 @@ const headCells = [ { id: 'displayLastDuetDate', numeric: false, disablePadding: false, label: 'Last Dueted with Singer' }, ]; -function descendingComparator(a, b, orderBy) { +function descendingComparator(a, b, orderBy, order) { + if ((b[orderBy] === "Solo performance") && (a[orderBy] !== "Solo performance")) { + return order === 'desc' ? -1 : 1 + } if (orderBy === "displayPublishDate") { orderBy = "publishDate" } @@ -46,8 +49,8 @@ function stableSort(array, comparator) { function getComparator(order, orderBy) { return order === 'desc' - ? (a, b) => descendingComparator(a, b, orderBy) - : (a, b) => -descendingComparator(a, b, orderBy); + ? (a, b) => descendingComparator(a, b, orderBy, order) + : (a, b) => -descendingComparator(a, b, orderBy, order); } function EnhancedTableHead(props) {