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

Closed
theharshin opened this issue Jan 8, 2020 · 2 comments

Comments

@theharshin
Copy link

@theharshin theharshin commented Jan 8, 2020

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

This comment has been minimized.

Copy link
Author

@theharshin theharshin commented Jan 8, 2020

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

@LinusBorg

This comment has been minimized.

Copy link
Member

@LinusBorg LinusBorg commented Jan 8, 2020

should be this.$props.to

this.props.to

@LinusBorg LinusBorg added the bug label Jan 8, 2020
@posva posva added this to Long term road (high prio, low complex) in Longterm Jan 14, 2020
@posva posva closed this in a150291 Jan 14, 2020
@posva posva moved this from Long term road (high prio, low complex) to Done in Longterm Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
3 participants
You can’t perform that action at this time.