mirror of
https://github.com/vector-im/element-web.git
synced 2026-01-10 19:11:30 +01:00
Filter out redacted poll votes to avoid crashing the Poll widget (#28498)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
72989ea646
commit
d8844c682b
@ -383,7 +383,10 @@ function userResponseFromPollResponseEvent(event: MatrixEvent): UserVote {
|
||||
|
||||
export function allVotes(voteRelations: Relations): Array<UserVote> {
|
||||
if (voteRelations) {
|
||||
return voteRelations.getRelations().map(userResponseFromPollResponseEvent);
|
||||
return voteRelations
|
||||
.getRelations()
|
||||
.filter((e) => !e.isRedacted())
|
||||
.map(userResponseFromPollResponseEvent);
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user