diff --git a/src/controllers/mods.js b/src/controllers/mods.js index 3eb722047e..14ce492303 100644 --- a/src/controllers/mods.js +++ b/src/controllers/mods.js @@ -36,9 +36,11 @@ modsController.flags.list = async function (req, res) { // Parse query string params for filters, eliminate non-valid filters filters = filters.reduce((memo, cur) => { - if (req.query.hasOwnProperty(cur) && typeof req.query[cur] === 'string') { - if (req.query[cur].trim() !== '') { + if (req.query.hasOwnProperty(cur)) { + if (typeof req.query[cur] === 'string' && req.query[cur].trim() !== '') { memo[cur] = req.query[cur].trim(); + } else if (Array.isArray(req.query[cur]) && req.query[cur].length) { + memo[cur] = req.query[cur]; } }