Skip to content

Commit 3454179

Browse files
committed
fix: rating change display in ranklist
1 parent 727a4d5 commit 3454179

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/components/Ranklist.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,9 @@ class Ranklist extends React.Component<Props, State> {
253253
}
254254
}
255255
}
256-
const hasRatingDelta = !!safeGet(ranklist, [0, 'user', 'newRating'], 0);
256+
const hasRatingDelta = ranklist.some((row) => {
257+
return row.user && row.user.newRating;
258+
});
257259

258260
return (
259261
<div>
@@ -285,7 +287,9 @@ class Ranklist extends React.Component<Props, State> {
285287
align="right"
286288
width={width.rank}
287289
fixed={canFixLeft}
288-
render={(text, record: IRanklistRow) => <div>{record.rank !== null ? record.rank : '*'}</div>}
290+
render={(text, record: IRanklistRow) => (
291+
<div>{record.rank !== null ? record.rank : '*'}</div>
292+
)}
289293
/>
290294
<Table.Column
291295
title="User"

0 commit comments

Comments
 (0)