From df7646ddebfa450dd9ca23be0ce8c797f87357df Mon Sep 17 00:00:00 2001 From: polaris Date: Sun, 7 Jul 2024 11:47:07 -0400 Subject: [PATCH] fixed null error --- components/scoreplaylog/colums.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/scoreplaylog/colums.tsx b/components/scoreplaylog/colums.tsx index c1d3d0f..293fd35 100644 --- a/components/scoreplaylog/colums.tsx +++ b/components/scoreplaylog/colums.tsx @@ -60,8 +60,8 @@ export const columns: ColumnDef[] = [ }, cell: ({ row }) =>
{row.original.score?.toLocaleString()}
, 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;