Skip to content

Commit 3d1008e

Browse files
committed
Fixes sorting on columns with objects
1 parent 22ce7dc commit 3d1008e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

assets/js/Components/Reports/IssuesTable.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ export default function IssuesTable({
3737
let aValue = a[sortBy]
3838
let bValue = b[sortBy]
3939

40-
if (sortBy === "label") {
41-
aValue = a.display || ""
42-
bValue = b.display || ""
40+
if (typeof(aValue) === "object" && typeof(bValue) === "object") {
41+
aValue = a[sortBy + "_display"] || ""
42+
bValue = b[sortBy + "_display"] || ""
4343
}
4444

4545
if (isNaN(aValue) || isNaN(bValue)) {

0 commit comments

Comments
 (0)