Skip to content

Commit

Permalink
fix: zipObject
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Apr 17, 2024
1 parent 8410cec commit 110ce66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/socket.io/posts/votes.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ module.exports = function (SocketPosts) {
privileges.users.isAdministrator(uid),
privileges.users.isModerator(uid, cids),
]);
const cidToAllowed = _.zip(uniqCids, canRead);
const cidToAllowed = _.zipObject(uniqCids, canRead);
const checks = cids.map(
(cid, index) => isAdmin || isMod[index] || (cidToAllowed[cid] && !!meta.config.votesArePublic)
);
Expand Down

0 comments on commit 110ce66

Please sign in to comment.