fix is most common comparison failing

This commit is contained in:
KDSBrowne 2022-11-20 14:26:52 +00:00
parent 7d4e50993f
commit 604446ffe0

View File

@ -321,7 +321,7 @@ const PollsTable = (props) => {
const answersSorted = Object.entries(pollVotesCount[v?.pollId])
.sort(([, countA], [, countB]) => countB - countA);
const isMostCommonAnswer = (
answersSorted[0]?.[0]?.toLowerCase() === params?.value[0]?.toLowerCase()
answersSorted[0]?.[0]?.toLowerCase() === params?.value?.toLowerCase()
&& answersSorted[0]?.[1] > 1
);
return <GridCellExpand anonymous={v?.anonymous} isMostCommonAnswer={isMostCommonAnswer} value={params?.value || ''} width={params?.colDef?.computedWidth} />;