diff --git a/src/containers/Proposals/Cards.js b/src/containers/Proposals/Cards.js index 5f9bb91..a80444d 100644 --- a/src/containers/Proposals/Cards.js +++ b/src/containers/Proposals/Cards.js @@ -73,7 +73,7 @@ const Cards = (props) => { if (index < (page * rowsPerPage) && index >= (page - 1) * rowsPerPage) { const votedOption = props.voteDetails && props.voteDetails.length && proposal && proposal.id && - props.voteDetails.filter((vote) => vote.id === proposal.id)[0]; + props.voteDetails.filter((vote) => vote && vote.id === proposal.id)[0]; let proposer = proposal.proposer; props.proposalDetails && Object.keys(props.proposalDetails).length && Object.keys(props.proposalDetails).filter((key) => { diff --git a/src/containers/Proposals/ProposalDialog/index.js b/src/containers/Proposals/ProposalDialog/index.js index 4aba443..8e4f647 100644 --- a/src/containers/Proposals/ProposalDialog/index.js +++ b/src/containers/Proposals/ProposalDialog/index.js @@ -110,7 +110,7 @@ class ProposalDialog extends Component { render () { let votedOption = this.props.voteDetails && this.props.voteDetails.length && this.props.proposal && this.props.proposal.id && - this.props.voteDetails.filter((vote) => vote.id === this.props.proposal.id)[0]; + this.props.voteDetails.filter((vote) => vote && vote.id === this.props.proposal.id)[0]; let proposer = this.props.proposal && this.props.proposal.proposer; this.props.proposalDetails && Object.keys(this.props.proposalDetails).length &&