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.
This commit is contained in:
parent
356f6331c1
commit
8dad2db2e2
@ -73,6 +73,7 @@ class LiveResult extends PureComponent {
|
|||||||
: [...users];
|
: [...users];
|
||||||
|
|
||||||
userAnswers = userAnswers.map(id => usernames[id])
|
userAnswers = userAnswers.map(id => usernames[id])
|
||||||
|
.filter((user) => user)
|
||||||
.map((user) => {
|
.map((user) => {
|
||||||
let answer = '';
|
let answer = '';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user