From 0f5764580b41a0a0a738a21b730af3babd6d257e Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sun, 15 Jan 2023 00:17:07 +0800 Subject: [PATCH] Fix bug due to votersCount can be null if multiple=false --- src/components/status.jsx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/components/status.jsx b/src/components/status.jsx index 2b246b80..1eb84f68 100644 --- a/src/components/status.jsx +++ b/src/components/status.jsx @@ -1134,16 +1134,15 @@ function Poll({ poll, lang, readOnly, onUpdate = () => {} }) { •{' '} )} - {shortenNumber(votersCount)}{' '} - {votersCount === 1 ? 'voter' : 'voters'} - {votersCount !== votesCount && ( + {shortenNumber(votesCount)} vote + {votesCount === 1 ? '' : 's'} + {!!votersCount && votersCount !== votesCount && ( <> {' '} - • - {shortenNumber(votesCount)} - {' '} - vote - {votesCount === 1 ? '' : 's'} + •{' '} + {shortenNumber(votersCount)}{' '} + voter + {votersCount === 1 ? '' : 's'} )}{' '} • {expired ? 'Ended' : 'Ending'}{' '}