From 41dc1095e544d09d0cfdcd6abc1bae6cfa98d104 Mon Sep 17 00:00:00 2001 From: Dalton Date: Fri, 7 Dec 2018 18:35:40 -0800 Subject: [PATCH] return empty on valid subreddit async --- bot.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bot.js b/bot.js index 28f3509..5c0453f 100644 --- a/bot.js +++ b/bot.js @@ -157,6 +157,8 @@ function handleRedditJson(data) { return json.data.children[rand].data.url; } } + // What if we don't find anything i.e. r/dogs but its valid subreddit. + return ""; } // Makes an async url request with the provided function: 'process'.