mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-03 11:01:20 +01:00
fix: NaN on ap post delete
This commit is contained in:
@@ -137,7 +137,7 @@ module.exports = function (Posts) {
|
||||
}
|
||||
topicTasks.push(topics.updateTeaser(tid));
|
||||
topicTasks.push(topics.updateLastPostTimeFromLastPid(tid));
|
||||
const postsByUid = _.groupBy(posts, p => parseInt(p.uid, 10));
|
||||
const postsByUid = _.groupBy(posts, p => String(p.uid));
|
||||
for (const [uid, uidPosts] of Object.entries(postsByUid)) {
|
||||
zsetIncrBulk.push([`tid:${tid}:posters`, -uidPosts.length, uid]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user