feck
This commit is contained in:
parent
5f95753de9
commit
f30fc0e068
1 changed files with 1 additions and 1 deletions
|
@ -149,7 +149,7 @@ module.exports = {
|
|||
|
||||
var tries = 0;
|
||||
var posts;
|
||||
while (posts.length == 0 && (tries++) < 5)
|
||||
while ((!posts || posts.length == 0) && (tries++) < 5)
|
||||
posts = await Booru.search(booru, searchTags, { limit: 1, random: true, credentials: credentials[booru] ?? null });
|
||||
|
||||
const post = posts[Math.floor(Math.random() * posts.length)];
|
||||
|
|
Loading…
Reference in a new issue