Conform more of the codebase to strictNullChecks
(#10504
* Conform more of the codebase to `strictNullChecks` * Iterate
This commit is contained in:
parent
6db0c7a1a6
commit
bc60a9b594
18 changed files with 60 additions and 54 deletions
|
@ -236,7 +236,7 @@ export default class MPollBody extends React.Component<IBodyProps, IState> {
|
|||
* @returns userId -> UserVote
|
||||
*/
|
||||
private collectUserVotes(): Map<string, UserVote> {
|
||||
if (!this.state.voteRelations) {
|
||||
if (!this.state.voteRelations || !this.context) {
|
||||
return new Map<string, UserVote>();
|
||||
}
|
||||
return collectUserVotes(allVotes(this.state.voteRelations), this.context.getUserId(), this.state.selected);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue