QwikDev / qwik

Instant-loading web apps, without effort
https://qwik.dev
MIT License
20.75k stars 1.29k forks source link

[🐞] Link component, automatically redirects when you put a URL that doesn't exist #6571

Closed acalexuy closed 3 months ago

acalexuy commented 3 months ago

Which component is affected?

Qwik Runtime

Describe the bug

I have discovered a bug on Link component, when you tried to put a URL that doesn't exist on Link component. It will go to that 404 page automatically.

Expected behavior is that it should not go to the 404 page automatically unless the user click the link

Reproduction

https://qwik-ssg-sample.vercel.app/news/home-loans/1/

Steps to reproduce

  1. Go to https://qwik-ssg-sample.vercel.app/news/home-loans/1/
  2. Click "Go to news 4"
  3. Wait for a sec, it will redirect you to /news/home-loans/5 which is 404

Here's a minimal reproduction https://github.com/acalexuy/qwik-ssg.

  1. Run first the json-server npx json-server ./mocked/news.json
  2. then npm run preview

System Info

"@builder.io/qwik": "^1.4.3",
"@builder.io/qwik-city": "^1.4.3",

Additional Information

No response

gioboa commented 3 months ago

Thanks for this feedback. can you try with the latest Qwik version pls?

acalexuy commented 3 months ago

Solved on latest Qwik version (1.5.7)

gioboa commented 3 months ago

Thanks @acalexuy I'm glad that it's solved. :smile_cat: