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

2 transition-groups with different tags v-if / v-else = Cannot read property '$vnode' of null #8737

Open
Mboulianne opened this issue Aug 31, 2018 · 4 comments

Comments

@Mboulianne
Copy link

Version

2.5.16

Reproduction link

https://codepen.io/anon/pen/BOpJZb

Steps to reproduce

1- Open the console
2- Click the button

What is expected?

In fact I don't know. I would expect not to see the error but I'm thinking maybe I'm doing something wrong.

What is actually happening?

Cannot read property '$vnode' of null appears in the console

@Mboulianne
Copy link
Author

Note: I've dug into the issue.
If I use v-shows instead of v-if / else it works.
If all my transition-group have the same tag it works, even with v-if-else. However, this is not practical in my case.
If there are no components in transition-group children, it works.

@Mboulianne
Copy link
Author

I've also thought of nesting my transition-groups in 2 divs that I'd apply the v-if/else on and I get the same error
I've added the code in my codePen

@posva
Copy link
Member

posva commented Aug 31, 2018

You can add a key attribute to the transition-group as well to remove the error but the error shouldn't appear indeed

@Mboulianne
Copy link
Author

@posva thank you for the workaround =D

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

No branches or pull requests

3 participants