Skip to content

Node.js based forum software built for the modern web

dont crash if topic is moved to pinned topic

Barış Soner Uşaklıaca50f1fe179
diff --git a/src/topics/fork.js b/src/topics/fork.js
index 7de56cd789..6964314814 100644
--- a/src/topics/fork.js
+++ b/src/topics/fork.js
@@ -149,8 +149,6 @@ module.exports = function (Topics) {
}
if (!topicData[1].pinned) {
tasks.push(async.apply(db.sortedSetIncrBy, 'cid:' + topicData[1].cid + ':tids:posts', 1, toTid));
- } else {
- next();
}
async.series(tasks, function (err) {
next(err);