Fix typescript error

c.f. (slightly outdated, but same spirit)
https://github.com/DefinitelyTyped/DefinitelyTyped/pull/43434#issuecomment-607181516

Signed-off-by: Dexter Chua <dec41@srcf.net>
This commit is contained in:
Dexter Chua 2020-07-03 23:29:50 +08:00
parent c3a79fee9d
commit 5829611def

View file

@ -26,7 +26,7 @@ StatusRouter.get('/temp', function (req, res) {
errors.errorForbidden(res) errors.errorForbidden(res)
} else { } else {
const tempid = req.query.tempid const tempid = req.query.tempid
if (!tempid) { if (!tempid || typeof tempid !== 'string') {
errors.errorForbidden(res) errors.errorForbidden(res)
} else { } else {
Temp.findOne({ Temp.findOne({