From cb2f6f7c4ad206661345790f9f38ccc890831d7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Sun, 4 Oct 2020 22:11:41 -0400 Subject: [PATCH] fix: test --- src/controllers/mods.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/controllers/mods.js b/src/controllers/mods.js index fe9c357d8a..859d24406c 100644 --- a/src/controllers/mods.js +++ b/src/controllers/mods.js @@ -213,7 +213,8 @@ modsController.postQueue = async function (req, res, next) { categories.buildForSelect(req.uid, 'find', ['disabled', 'link', 'slug']), helpers.getCategoriesByStates(req.uid, cid, null, 'moderate'), ]); - if (!moderatedCids.includes(String(cid)) && !isAdminOrGlobalMod) { + + if (cid && !moderatedCids.includes(String(cid)) && !isAdminOrGlobalMod) { return next(); } allCategories.forEach((c) => {