From a9adfe9428d97e6153610bc5b0208497ddd18853 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Mon, 23 Jun 2014 16:22:05 -0400 Subject: [PATCH] fix crash in topic move --- src/categories/recentreplies.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/categories/recentreplies.js b/src/categories/recentreplies.js index 72e47f4f05..a9ea8e9248 100644 --- a/src/categories/recentreplies.js +++ b/src/categories/recentreplies.js @@ -77,7 +77,9 @@ module.exports = function(Categories) { db.incrObjectFieldBy('category:' + newCid, 'post_count', postCount, next); } ], function(err) { - winston.error(err.message); + if (err) { + winston.error(err.message); + } }); }); }