Node.js based forum software built for the modern web
closes #4567
barisusaklieb28e178a7dc
diff --git a/src/categories/create.js b/src/categories/create.jsindex 7f1f3955f7..f6338f8ef2 100644--- a/src/categories/create.js+++ b/src/categories/create.js@@ -97,11 +97,11 @@ module.exports = function(Categories) {destination = results.destination;var tasks = [];- if (parseInt(results.source.parentCid, 10)) {+ if (utils.isNumber(results.source.parentCid)) {tasks.push(async.apply(db.sortedSetAdd, 'cid:' + results.source.parentCid + ':children', results.source.order, toCid));}- if (destination && parseInt(destination.parentCid, 10)) {+ if (destination && utils.isNumber(destination.parentCid)) {tasks.push(async.apply(db.sortedSetRemove, 'cid:' + destination.parentCid + ':children', toCid));}