maybe this will work

This commit is contained in:
loicbersier 2019-07-09 05:26:17 +02:00
parent 6ec6e59d8d
commit b6e4387c73

View file

@ -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));
}