fixed null error
This commit is contained in:
@ -60,8 +60,8 @@ export const columns: ColumnDef<chunithm>[] = [
|
||||
},
|
||||
cell: ({ row }) => <div>{row.original.score?.toLocaleString()}</div>,
|
||||
sortingFn: (a, b) => {
|
||||
const highScore = a.original.score;
|
||||
const lowScore = b.original.score;
|
||||
const highScore = a.original.score ?? 0;
|
||||
const lowScore = b.original.score ?? 0;
|
||||
|
||||
if (highScore < lowScore) return 1;
|
||||
if (highScore > lowScore) return -1;
|
||||
|
Reference in New Issue
Block a user