Fix comparator function for TrialIntermediateValue table

This commit is contained in:
c-bata
2022-05-25 21:31:50 +09:00
parent 22d4207c16
commit d1ced4eb95
+7 -10
View File
@@ -667,17 +667,14 @@ export const TrialTable: FC<{ studyDetail: StudyDetail | null }> = ({
if (firstVal === secondVal) {
return 0
}
if (
firstVal === "-inf" ||
secondVal === "nan" ||
secondVal === "inf"
) {
if (firstVal === "nan") {
return -1
} else if (secondVal === "nan") {
return 1
} else if (
secondVal === "-inf" ||
firstVal === "nan" ||
firstVal === "inf"
) {
}
if (firstVal === "-inf" || secondVal === "inf") {
return 1
} else if (secondVal === "-inf" || firstVal === "inf") {
return -1
}
return firstVal < secondVal ? 1 : -1