fix: index should be cid

This commit is contained in:
Barış Soner Uşaklı
2024-04-17 09:15:35 -04:00
parent de0176ef8a
commit 8410cec797

View File

@@ -91,7 +91,7 @@ module.exports = function (SocketPosts) {
]); ]);
const cidToAllowed = _.zip(uniqCids, canRead); const cidToAllowed = _.zip(uniqCids, canRead);
const checks = cids.map( const checks = cids.map(
(cid, index) => isAdmin || isMod[index] || (cidToAllowed[index] && !!meta.config.votesArePublic) (cid, index) => isAdmin || isMod[index] || (cidToAllowed[cid] && !!meta.config.votesArePublic)
); );
return isArray ? checks : checks[0]; return isArray ? checks : checks[0];
} }