From 8dad2db2e22720ac0a1ac1d17bc7b239cc8b50cd Mon Sep 17 00:00:00 2001 From: Arthurk12 Date: Fri, 19 Apr 2024 09:42:19 -0300 Subject: [PATCH] fix(poll): filter users array before processing Fix a crash in the polls live result by filtering out undefined users. This scenario might happen when getting user information by an id that is not present in the current usernames list by some inconsistency between the user's information from the users context and poll votes/responses. --- .../imports/ui/components/poll/live-result/component.jsx | 1 + 1 file changed, 1 insertion(+) 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 065fd58588..ba41a4ff24 100644 --- a/bigbluebutton-html5/imports/ui/components/poll/live-result/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/poll/live-result/component.jsx @@ -73,6 +73,7 @@ class LiveResult extends PureComponent { : [...users]; userAnswers = userAnswers.map(id => usernames[id]) + .filter((user) => user) .map((user) => { let answer = '';