From 5829611defc87d036af5b51eb200667df62708a9 Mon Sep 17 00:00:00 2001 From: Dexter Chua Date: Fri, 3 Jul 2020 23:29:50 +0800 Subject: [PATCH] Fix typescript error c.f. (slightly outdated, but same spirit) https://github.com/DefinitelyTyped/DefinitelyTyped/pull/43434#issuecomment-607181516 Signed-off-by: Dexter Chua --- src/lib/web/statusRouter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/web/statusRouter.ts b/src/lib/web/statusRouter.ts index e1acfdfc5..7eac7721c 100644 --- a/src/lib/web/statusRouter.ts +++ b/src/lib/web/statusRouter.ts @@ -26,7 +26,7 @@ StatusRouter.get('/temp', function (req, res) { errors.errorForbidden(res) } else { const tempid = req.query.tempid - if (!tempid) { + if (!tempid || typeof tempid !== 'string') { errors.errorForbidden(res) } else { Temp.findOne({