pastelsky / bundlephobia

🏋️ Find out the cost of adding a new frontend dependency to your project
https://bundlephobia.com
MIT License
8.92k stars 221 forks source link

Getting 404 for empty input #770

Open Illusion47586 opened 1 year ago

Illusion47586 commented 1 year ago

Describe the bug It looks like it is expected behaviour but I don't think we should allow an empty input call from the frontend.

To Reproduce

image

Don't type anything in the search box and press enter.

image

It takes you to https://bundlephobia.com/package which gives 404.

Expected behavior I believe we should just do nothing when the input is empty.

Let me know if the suggested fix is good and I can make a relevant PR for the same.

pastelsky commented 1 year ago

Makes sense — the fix should be quite simple, so marking this as a good first issue.

upteran commented 1 year ago

Hi, I've sent PR, check pls and if need some changes, I'll update it