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 a58354a commit cf34d89Copy full SHA for cf34d89
hooks/convertPoll.ts
@@ -19,7 +19,7 @@ export default async (context: HookContext): Promise<HookContext> => {
19
{ $group: { _id: '$which', total: { $sum: 1 } } }
20
]).then(groups => groups.reduce(
21
(acc, group) => _.set(acc, group._id + '.votes', group.total),
22
- {}
+ { left: { votes: 0 }, right: { votes: 0 } }
23
));
24
25
const userChoice = await VoteModel.findOne({ pollId: poll._id, userId: user?._id });
0 commit comments