Skip to content

Commit

Permalink
Fix: voting graph hot fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmeets-6575 committed Apr 26, 2024
1 parent ff18599 commit 630a99f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ const AnalyticsTurnoutPercentageGraph = ({ supportData }: IAnalyticsTurnoutPerce
}))
}
];
const minIndex = supportData[0].index;
const maxIndex = supportData[supportData.length - 1].index;
const minIndex = supportData[0]?.index;
const maxIndex = supportData[supportData.length - 1]?.index;
const marks = {
[0]: minIndex.toString(),
[supportData.length - 1]: maxIndex.toString()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ const AnalyticsVoteSplitGraph = ({ votesSplitData, isUsedInAccounts, isSmallScre
const tickInterval = Math.ceil(chartData.length / tickvalueDivisor);
const tickValues = chartData.filter((_, index) => index % tickInterval === 0).map((item) => `${item.index}`);

const minIndex = votesSplitData[0].index;
const maxIndex = votesSplitData[votesSplitData.length - 1].index;
const minIndex = votesSplitData[0]?.index;
const maxIndex = votesSplitData[votesSplitData.length - 1]?.index;
const marks = {
[0]: minIndex.toString(),
[votesSplitData.length - 1]: maxIndex.toString()
Expand Down

0 comments on commit 630a99f

Please sign in to comment.