From 8eb274f8ae2a9a97090a8a13d3d1b39966797bb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n=20Souza?= Date: Fri, 8 Oct 2021 11:42:58 +0000 Subject: [PATCH] calculate poll vote pct on current votes - live result --- .../imports/ui/components/poll/live-result/component.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/components/poll/live-result/component.jsx b/bigbluebutton-html5/imports/ui/components/poll/live-result/component.jsx index 27f9de9180..01d47bf00f 100644 --- a/bigbluebutton-html5/imports/ui/components/poll/live-result/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/poll/live-result/component.jsx @@ -56,7 +56,7 @@ class LiveResult extends PureComponent { if (!currentPoll) return null; const { - answers, responses, users, numRespondents, pollType + answers, responses, users, numResponders, pollType } = currentPoll; const defaultPoll = isDefaultPoll(pollType); @@ -105,7 +105,7 @@ class LiveResult extends PureComponent { answers.reduce(caseInsensitiveReducer, []).map((obj) => { const formattedMessageIndex = obj.key.toLowerCase(); - const pct = Math.round(obj.numVotes / numRespondents * 100); + const pct = Math.round(obj.numVotes / numResponders * 100); const pctFotmatted = `${Number.isNaN(pct) ? 0 : pct}%`; const calculatedWidth = {