From 378e1d2118bb3cec68e627e7957c83f72e63222d Mon Sep 17 00:00:00 2001 From: wukko Date: Sun, 4 Sep 2022 11:32:06 +0600 Subject: [PATCH] Update cobalt.js --- src/cobalt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cobalt.js b/src/cobalt.js index 866c6b99..c7eebed9 100644 --- a/src/cobalt.js +++ b/src/cobalt.js @@ -73,7 +73,7 @@ if (fs.existsSync('./.env')) { res.status(j.status).json(j.body); } else { let j = apiJSON(3, { t: loc(languageCode(req), 'ErrorNoLink', process.env.selfURL) }) - if (!j === undefined && j.status && j.body) { + if (!typeof j === "undefined" && j.status && j.body) { res.status(j.status).json(j.body); } else { res.status(500).json({ 'status': 'error', 'text': loc(languageCode(req), 'ErrorUnknownStatus') })