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
Named route records with optional root-level param will result in an empty URL when you don't use the param #1357
Comments
@posva I see this got merged, however, I don't believe the issue was addressed. The issue still seems to be affecting all recent versions of vue-router. I have tried 4.0.15, 4.0.16, 4.1.1 and all suffer from this problem. Can you please re-evaluate? |
I checked and this is working |
It's broken in the jsfiddle linked above - inspect element on the "Hot" link and see that it has no href. I wasn't sure if the jsfiddle was locked to a specific version of vue-router so I recreated in a new fiddle that is exactly the same code - same result. |
@posva any thoughts on why the OP's example is still suffering from the original reported problem? Happy to be proven wrong here, but as I say I am also suffering from this problem (in current version of vue-router) and I only ended up on this issue because I was about to report it myself. |
the repro is using an outdated version of vue router, remove the next tag and it works. If you found another bug open a new issue with a boiled down reproduction. |
OK thanks for that clarification. I will figure out what is different about my use case and create a separate issue. Thanks! |
Version
4.0.14
Reproduction link
jsfiddle.net/5m1nz3gf/
Steps to reproduce
Inspect the "Hot" url to see that the tag's href attribute is an empty string.
The other link's href attributes are correct.
If you click on the Hot link, it routes correctly since the router is the thing doing the direction, but if you look at the status bar when hovering the link, it'll show the current page's address since the href is empty. This breaks middle clicking to open in new tab since it will just open the current page instead of what vue router would actually direct to.
What is expected?
It should render the href attribute as '/'
What is actually happening?
Empty href
The text was updated successfully, but these errors were encountered: