Skip to content

Commit

Permalink
Revert "fix(RankChart): acc.at -> acc[ ]"
Browse files Browse the repository at this point in the history
This reverts commit 4fa5cde.
  • Loading branch information
ryoppippi committed Feb 5, 2025
1 parent 9a8ec37 commit bebd5aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/RankChart/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function getRanking(articles: Article[]): Ranking[] {
/** ランクを計算。同じ記事数の場合は同じランクにする */
.reduce((acc, currentRankedUser, index) => {
/** 1つ前のユーザー */
const prevRankedUser = acc[index - 1];
const prevRankedUser = acc.at(index - 1);

/**
もし前の要素が存在し、記事数が同じ場合は同じランクにする
Expand Down

0 comments on commit bebd5aa

Please sign in to comment.