diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2018-07-25 22:01:25 +0200 |
---|---|---|
committer | Rigel Kent <sendmemail@rigelk.eu> | 2018-07-25 22:01:25 +0200 |
commit | c1e791bad0b079af67398f6407221e6dcbb573dd (patch) | |
tree | 82e5944b4458dd35aa482a38f6b650eb93bb89ad /server/middlewares | |
parent | 5f7021c33d31c5255b995ae0ff86b5bbea4ea4b9 (diff) | |
download | PeerTube-c1e791bad0b079af67398f6407221e6dcbb573dd.tar.gz PeerTube-c1e791bad0b079af67398f6407221e6dcbb573dd.tar.zst PeerTube-c1e791bad0b079af67398f6407221e6dcbb573dd.zip |
expliciting type checks and predicates (server only)
Diffstat (limited to 'server/middlewares')
-rw-r--r-- | server/middlewares/sort.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/middlewares/sort.ts b/server/middlewares/sort.ts index 8a62c8be6..5120804b3 100644 --- a/server/middlewares/sort.ts +++ b/server/middlewares/sort.ts | |||
@@ -15,7 +15,7 @@ function setDefaultSearchSort (req: express.Request, res: express.Response, next | |||
15 | } | 15 | } |
16 | 16 | ||
17 | function setBlacklistSort (req: express.Request, res: express.Response, next: express.NextFunction) { | 17 | function setBlacklistSort (req: express.Request, res: express.Response, next: express.NextFunction) { |
18 | let newSort: SortType = { sortModel: undefined, sortValue: undefined } | 18 | let newSort: SortType = { sortModel: undefined, sortValue: '' } |
19 | 19 | ||
20 | if (!req.query.sort) req.query.sort = '-createdAt' | 20 | if (!req.query.sort) req.query.sort = '-createdAt' |
21 | 21 | ||