Skip to content

Commit

Permalink
fix: sorting the flags list by newest is not considered a filter
Browse files Browse the repository at this point in the history
... as it is default
  • Loading branch information
julianlam committed Aug 19, 2020
1 parent e047b72 commit 3efe236
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/controllers/mods.js
Expand Up @@ -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
Expand Down

0 comments on commit 3efe236

Please sign in to comment.