Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random image is always image 1. #1

Open
r4dian opened this issue Jul 18, 2024 · 0 comments
Open

Random image is always image 1. #1

r4dian opened this issue Jul 18, 2024 · 0 comments

Comments

@r4dian
Copy link

r4dian commented Jul 18, 2024

  1. Visit /api/random
  2. it always redirects to image 1

in api.js:56 const randomID = Math.floor(Math.random() * lastID) + 1;, lastID is still at the initial value of 0 so this is equivalent to const randomID = 0 + 1;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant