Skip to content

Commit

Permalink
fix: off by one
Browse files Browse the repository at this point in the history
  • Loading branch information
djpiper28 committed Oct 28, 2024
1 parent 17db9e6 commit 53b8a90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/app/q/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export default function Card(props: {
const sets = useMemo(() => {
let sets = props.data.sets;
if (sets.length > MAX_SETS_TO_SHOW) {
sets = sets.slice(0, MAX_SETS_TO_SHOW);
sets.push(`(${sets.length - MAX_SETS_TO_SHOW}) ...`);
sets = sets.slice(0, MAX_SETS_TO_SHOW - 1);
sets.push(`(${sets.length - MAX_SETS_TO_SHOW} more ...)`);
}

return sets.map((x) => x.toUpperCase()).join(", ");
Expand Down

0 comments on commit 53b8a90

Please sign in to comment.