Commit 679db5b7 authored by justinw's avatar justinw
Browse files

check if array of user voted proposal ids contains current proposal

parent 887918a2
......@@ -107,11 +107,11 @@ export function* listProposals({
const mungedProposals = proposals.map(p => {
console.log(
'ProposalSaga->listProposals()::proposalVotesIds.indexOf(p.proposal_id)',
proposalVotesIds.indexOf(p.proposal_id),
proposalVotesIds.includes(p.proposal_id),
proposalVotesIds
);
console.log('ProposalSaga->listProposals()::p', p, p.upVoted);
if (proposalVotesIds.indexOf(p.proposal_id) != -1) {
if (proposalVotesIds.includes(p.proposal_id)) {
p.upVoted = true;
} else {
p.upVoted = false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment