Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Commit

Permalink
Fixes undefined results excepcion
Browse files Browse the repository at this point in the history
  • Loading branch information
emmdim committed Nov 29, 2023
1 parent 305ba08 commit 09eb81b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/blocks/question-results.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export const QuestionResults = (props: QuestionsResultsProps) => {
</Text>
</Col>
{/* SHOW RESULTS */}
{showResults ? (
{showResults && choice?.votes ? (
<>
<Col hiddenSmAndDown md={2}>
<Text size="lg" weight="bold" color="dark-blue">
Expand Down Expand Up @@ -152,7 +152,7 @@ export const QuestionResults = (props: QuestionsResultsProps) => {
<Text size="sm" color="dark-gray" weight="regular">
<BreakWord>
{i18n.t('vote.vote_count', {
count: getResults(choice.votes, decimals).toString() as never,
count: getResults(choice.votes, decimals).toString() as any,

Check warning on line 155 in components/blocks/question-results.tsx

View workflow job for this annotation

GitHub Actions / node-tests-and-build

Unexpected any. Specify a different type

Check warning on line 155 in components/blocks/question-results.tsx

View workflow job for this annotation

GitHub Actions / node-tests-and-build

Unexpected any. Specify a different type
})}
</BreakWord>
</Text>
Expand Down

0 comments on commit 09eb81b

Please sign in to comment.