Skip to content

Commit

Permalink
vote fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
SrikanthSoparla committed Feb 2, 2024
1 parent ad22061 commit f290a59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/containers/Proposals/Cards.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Proposals/ProposalDialog/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit f290a59

Please sign in to comment.