subreddit vomit

This commit is contained in:
Dalton
2018-12-11 21:58:59 -08:00
parent 5f1024c183
commit b34f3e8d07

7
bot.js
View File

@@ -250,7 +250,12 @@ function subredditRequest(subreddit) {
req.onreadystatechange = function () { req.onreadystatechange = function () {
if (req.readyState === 4 && req.status === 200) { 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; let counter = 0;