From b6e4387c73d2dd9dd339cce2bedb4dc78a131164 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Tue, 9 Jul 2019 05:26:17 +0200 Subject: [PATCH] maybe this will work --- commands/fun/4chan.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); }