-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Voting: fix bug with votes not loading initially #812
Conversation
@@ -26,6 +32,8 @@ function appStateReducer(state) { | |||
tokenDecimals: tokenDecimalsNum, | |||
}, | |||
|
|||
connectedAccountVotes: connectedAccountVotes || {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to ensure there's an object in
aragon-apps/apps/voting/app/src/vote-hooks.js
Lines 29 to 32 in 4afc2ad
open: isVoteOpen(vote, now), | |
}, | |
connectedAccountVote: connectedAccountVotes[vote.voteId] || VOTE_ABSENT, | |
})) |
@@ -222,7 +224,7 @@ async function startVote(state, { creator, metadata, voteId }) { | |||
* * | |||
***********************/ | |||
|
|||
async function getAccountVotes({ connectedAccount, votes }) { | |||
async function getAccountVotes({ connectedAccount, votes = [] }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we leave a comment for why we need to default this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I think I was the one that asked if we could remove the default for votes
D:.
A comment in the first place would have prevented that :) |
* Voting: fix bug with votes not loading initially * Add comment
No description provided.