Node.js based forum software built for the modern web
fix: NaN on ap post delete
Barış Soner Uşaklı53b208b769b7
diff --git a/src/posts/delete.js b/src/posts/delete.jsindex c4be1b6eb7..da4e470b3a 100644--- a/src/posts/delete.js+++ b/src/posts/delete.js@@ -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]);}