mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 09:06:15 +01:00
fix: sorting the flags list by newest is not considered a filter
... as it is default
This commit is contained in:
@@ -88,6 +88,9 @@ modsController.flags.list = async function (req, res, next) {
|
|||||||
} else {
|
} else {
|
||||||
sort = sorts.includes(req.query.sort) ? req.query.sort : null;
|
sort = sorts.includes(req.query.sort) ? req.query.sort : null;
|
||||||
}
|
}
|
||||||
|
if (sort === 'newest') {
|
||||||
|
sort = undefined;
|
||||||
|
}
|
||||||
hasFilter = hasFilter || !!sort;
|
hasFilter = hasFilter || !!sort;
|
||||||
|
|
||||||
// Save filters and sorting into session unless removed
|
// Save filters and sorting into session unless removed
|
||||||
|
|||||||
Reference in New Issue
Block a user