Compare commits

..

No commits in common. "d3d921b3c89e2e327dc0334edcf82d972db8ea5e" and "e7620ccd425d66cce69e098ac3b8023d6db4a3e7" have entirely different histories.

3 changed files with 6 additions and 7 deletions

7
.gitignore vendored
View file

@ -1,4 +1,3 @@
node_modules/
dist/
coverage/
yarn-error.log
node_modules
dist
yarn-error.log

View file

@ -1,6 +1,6 @@
{
"name": "random-bunny",
"version": "2.1.2",
"version": "2.1.1",
"description": "Get a random subreddit image url",
"license": "MIT",
"author": "Vylpes",

View file

@ -41,8 +41,8 @@ export default async function randomBunny(subreddit: string, sortBy?: string): P
return {
IsSuccess: false,
};
} else {
random = Math.floor((Math.random() * (dataWithImages.length - 1)) + 0); // Between 0 and (size - 1)
} else if (dataWithImages.length > 1) {
random = Math.floor((Math.random() * dataWithImages.length - 1) + 0); // Between 0 and (size - 1)
}
const randomSelect = dataWithImages[random];