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 9578dfa4fd
commit 76abc9a16a

View File

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