Update src/utils/postParser.js

This commit is contained in:
uğur erdal 2019-08-23 16:00:55 +03:00 committed by GitHub
parent 495f11aabc
commit 8e16e2fb99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -150,7 +150,7 @@ export const parseComments = async (comments, currentUserName) => {
const isVoted = (activeVotes, currentUserName) => { const isVoted = (activeVotes, currentUserName) => {
const result = activeVotes.find( const result = activeVotes.find(
element => element.voter === currentUserName && element.percent > 0, element => get(element, 'voter') === currentUserName && get(element, 'percent', 0) > 0,
); );
if (result) { if (result) {
return result.percent; return result.percent;