diff --git a/bot.js b/bot.js index 62069a7..dde84a8 100644 --- a/bot.js +++ b/bot.js @@ -250,7 +250,12 @@ function subredditRequest(subreddit) { req.onreadystatechange = function () { if (req.readyState === 4 && req.status === 200) { - let json = JSON.parse(req.responseText); + let json; + if (req.responseText) { + json = JSON.parse(req.responseText); + } else { + return "" + } let counter = 0;