This commit is contained in:
Victoria A
2023-10-27 08:21:49 +01:00
parent a4ff5c61af
commit 31360a4597
3 changed files with 7 additions and 3 deletions
+3 -1
View File
@@ -359,7 +359,9 @@ function stableSort<T>(
stabilizedThis.sort((a, b) => {
if (less) {
const ascending = order == "asc"
const result = ascending ? -less(a[0], b[0], ascending) : less(a[0], b[0], ascending)
const result = ascending
? -less(a[0], b[0], ascending)
: less(a[0], b[0], ascending)
if (result !== 0) return result
} else {
const result = comparator(a[0], b[0])
+3 -1
View File
@@ -359,7 +359,9 @@ function stableSort<T>(
stabilizedThis.sort((a, b) => {
if (less) {
const ascending = order == "asc"
const result = ascending ? -less(a[0], b[0], ascending) : less(a[0], b[0], ascending)
const result = ascending
? -less(a[0], b[0], ascending)
: less(a[0], b[0], ascending)
if (result !== 0) return result
} else {
const result = comparator(a[0], b[0])
+1 -1
View File
@@ -65,7 +65,7 @@ export const TrialTable: FC<{
return 0
}
if (firstVal === undefined) {
return ascending ? -1 : 1
return ascending ? -1 : 1
} else if (secondVal === undefined) {
return ascending ? 1 : -1
}