mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-05 20:11:26 +01:00
missing err check
This commit is contained in:
@@ -175,6 +175,9 @@ module.exports = function(Topics) {
|
||||
|
||||
Topics.addPostToTopic = function(tid, pid, timestamp, votes, callback) {
|
||||
Topics.getTopicField(tid, 'mainPid', function(err, mainPid) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
if (!parseInt(mainPid, 10)) {
|
||||
Topics.setTopicField(tid, 'mainPid', pid, callback);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user