We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf34d89 commit a9678b7Copy full SHA for a9678b7
hooks/convertPoll.ts
@@ -22,7 +22,9 @@ export default async (context: HookContext): Promise<HookContext> => {
22
{ left: { votes: 0 }, right: { votes: 0 } }
23
));
24
25
- const userChoice = await VoteModel.findOne({ pollId: poll._id, userId: user?._id });
+ const userChoice = await VoteModel.findOne(
26
+ { pollId: poll._id, userId: user?._id }
27
+ ).then(vote => vote?.which);
28
29
return _.merge(
30
_.omit(poll, ['authorId']),
0 commit comments