Skip to content

Commit

Permalink
fix: Don't run votes query for default value
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaituVR committed Nov 27, 2023
1 parent 1d99d6a commit 02c2594
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

0 comments on commit 02c2594

Please sign in to comment.