Skip to content

Commit

Permalink
fix: Don't run votes query for default value (#4405)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaituVR authored Nov 28, 2023
1 parent bf6f64b commit 9cc2596
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/composables/useProposals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function useProposals() {

const { apolloQuery } = useApolloQuery();
async function getUserVotedProposalIds(voter: string, proposals: string[]) {
if (!voter || !proposals) return;
if (!voter || !proposals?.length) return;
const votes = await apolloQuery(
{
query: USER_VOTED_PROPOSAL_IDS_QUERY,
Expand Down

1 comment on commit 9cc2596

@vercel
Copy link

@vercel vercel bot commented on 9cc2596 Nov 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.