Skip to content
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

<router-link> throws an error if multiple child elements provided with v-slot API. #3091

Comments

@theharshin
Copy link

Version

3.1.3

Reproduction link

https://codesandbox.io/s/condescending-yalow-gn5fz?fontsize=14&hidenavigation=1&module=%2Fsrc%2FApp.vue&theme=dark

Steps to reproduce

Create a router-link component with v-slot API and provide multiple child elements.

What is expected?

According to the docs here: https://router.vuejs.org/api/#v-slot-api-3-1-0
The content should be automatically wrapped with and router-link should work fine.

What is actually happening?

The rendering of a component fails and throws an error with the following message: "TypeError: this.props is undefined"

@theharshin
Copy link
Author

It looks like when Vue tries to show a warning for a single child but fails because this.props is undefined.
image

@LinusBorg
Copy link
Member

LinusBorg commented Jan 8, 2020

should be this.$props.to

this.props.to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment