From 8ba70833f3e6181c77d0d3b5bae186378a8729aa Mon Sep 17 00:00:00 2001 From: hippoz <10706925-hippoz@users.noreply.gitlab.com> Date: Sun, 5 Feb 2023 23:33:50 +0200 Subject: [PATCH] fix condition --- src/routes/api/v1/channels.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/api/v1/channels.ts b/src/routes/api/v1/channels.ts index 4698853..bf462e3 100644 --- a/src/routes/api/v1/channels.ts +++ b/src/routes/api/v1/channels.ts @@ -200,7 +200,7 @@ router.get( const { before, count } = req.query; let limit = typeof count === "string" ? parseInt(count || "25") : 25; - if (limit === NaN) { + if (Number.isNaN(limit)) { return res.status(400).json({ ...errors.INVALID_DATA }); }