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

Using v-for on a functional component which returns multiple nodes renders "undefined" #8897

Closed
Herteby opened this issue Oct 5, 2018 · 1 comment

Comments

@Herteby
Copy link

Herteby commented Oct 5, 2018

Version

2.5.17

Reproduction link

https://jsfiddle.net/Herteby/r2nb09eg/

Steps to reproduce

As the title says, or just look at the fiddle :)

What is expected?

The slots should be rendered properly.
The combination of v-for and "fragment" should return an Array of VNodes.

What is actually happening?

The slots render as "undefined"
It returns an Array of Arrays of Vnodes.


The problem seems to be that the result becomes an Array of Arrays of VNodes. Seems like it ought to be flattened.
For some reason, if you add an extra element as a sibling, it fixes it.

@posva
Copy link
Member

posva commented Oct 5, 2018

Duplicate of #8468

@posva posva marked this as a duplicate of #8468 Oct 5, 2018
@posva posva closed this as completed Oct 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants