diff --git a/commands/fun/4chan.js b/commands/fun/4chan.js index 8e13e0ac..a97ea39e 100644 --- a/commands/fun/4chan.js +++ b/commands/fun/4chan.js @@ -45,7 +45,7 @@ class FourchanCommand extends Command { i = Math.floor((Math.random() * response.threads.length) + 1); // If post is sticky search again - while(response.threads[i].posts[0].sticky == 1 || !response.threads[i].posts[0]) { + while(response.threads[i].posts[0].sticky == 1 || !response.threads[i].posts) { i = Math.floor((Math.random() * response.threads.length)); }