Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Steps to reproduce
Create a router-link with a to attribute that is a static string and wrap it around a child element (or elements) instead of using v-html
What is expected?
The router-link should render as an a tag with a correct href attribute and clicking the link should navigate through the router to the desired route.
Eg. Same code using router v3.0.7
What is actually happening?
The child elements are being rendered without the wrapping a tag. Note that About is not a link. In the example with router 3.0.7 About is correctly wrapped in an a tag that routes correctly on click.
I love the additional power added in the 3.1.0 update but please fix this breaking change.
I THINK this can be resolved with an additional check at https://github.com/vuejs/vue-router/blob/dev/src/components/link.js#L92
Would verify that the developer is attempting to leverage the new scoped slot functionality.
Otherwise the example above evaluates as a scoped slot and falls into