From 3efe2362e2992b2bff415b41fcfa35a3e7d772bf Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 19 Aug 2020 09:15:03 -0400 Subject: [PATCH] fix: sorting the flags list by newest is not considered a filter ... as it is default --- src/controllers/mods.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/controllers/mods.js b/src/controllers/mods.js index 2484361ea4ba..777a12712d27 100644 --- a/src/controllers/mods.js +++ b/src/controllers/mods.js @@ -88,6 +88,9 @@ modsController.flags.list = async function (req, res, next) { } else { sort = sorts.includes(req.query.sort) ? req.query.sort : null; } + if (sort === 'newest') { + sort = undefined; + } hasFilter = hasFilter || !!sort; // Save filters and sorting into session unless removed