-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update getPollResult to avoid translate undefined #4473
Update getPollResult to avoid translate undefined #4473
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function
@@ -171,6 +171,7 @@ export class TopicPdfService { | |||
return true; | |||
} | |||
}) | |||
.filter((singleResult: VotingResult) => !!singleResult.vote) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could just do this check within the other filter call.
Also in line 179 there is logic to handle such cases. So either remove that logic or adjust it. I've committed a solution with the latter to you PR as it does not come with behavioral changes (Which your solution actually introduces).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is removed. I have looked at your comment and think, it could work that way.
@Elblinator , @bspekker please retest after @bastianjoel commit. |
@bastianjoel 's code seems to be okay. My filter code is no longer needed and is removed. |
Resolve #4463
Exclude the singleVotingResult with vote equals undefined to avoid the translation of undefined.