vinitshahdeo / inspirational-quotes

:bulb: A simple NPM Package which returns random Inspirational Quotes. Get your daily quote and stay motivated! :v: :cherry_blossom:
https://www.npmjs.com/package/inspirational-quotes
MIT License
331 stars 1.81k forks source link

[bug] size to get a random int shouldn't be static i.e. 324 #1845

Open thisisamank opened 3 years ago

thisisamank commented 3 years ago

The size to fetch a random int at line 11 and 16 of index.js is static please fix this.

welcome[bot] commented 3 years ago

Thanks for opening this issue! 🤗 Wishing you a great Hacktoberfest 2020 🙌 🎉 ⚡️ Are you looking for beginner-friendly issues? Check out this repo.

Hacktoberfest2020

📢 Spread the word about @vinitshahdeo/Hacktoberfest2021 repo across your social media channels to help get others involved! Know out the community-led initiative to mentor beginners for Hacktoberfest'21 here.

Open Source Love

Check out few other repos below 🚀

PortScanner SimpleBio HBD Map Of India

Show some ❤️

Say Hi on Twitter! 👋

Twitter Follow

danielphilipjohnson commented 3 years ago

I'm about to push a fix for this if its okay :)

Gourab-18 commented 3 years ago

I have fixed this bug. You can have a look at it and give feedback.

danielphilipjohnson commented 3 years ago

I'm about to push a fix for this if its okay :)

I’ve resolved the issue and made sure the index doesn’t go out of bounds. By subtracting -1 from the length

https://github.com/vinitshahdeo/inspirational-quotes/pull/1853